aboutsummaryrefslogblamecommitdiffstats
path: root/community/sudo/APKBUILD
blob: 4014c44bd8208e2c0188706e7982a224b0f2d4c8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                              
                                                   

                                                   
                




                                         
        
                                                                     
                               
          
                    
                                  
                                       
                                                       
              
                                 
 
           

                     


                      

                      
              
                      
                 
                        
 
         



                                 
                                       
                                         

                               
                                   
                             

                                
                                                    
                                                            
 
            

 
         


                  
           

                                                               


                                                        


                                          

 
            
                                                                                                                                                      
 
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sudo
pkgver=1.9.11_p3
if [ "${pkgver%_*}" != "$pkgver" ]; then
	_realver=${pkgver%_*}${pkgver#*_}
else
	_realver=$pkgver
fi
pkgrel=0
pkgdesc="Give certain users the ability to run some commands as root"
url="https://www.sudo.ws/sudo/"
arch="all"
license="custom ISC"
makedepends="zlib-dev bash mandoc"
subpackages="$pkgname-doc $pkgname-dev"
source="https://www.sudo.ws/dist/sudo-$_realver.tar.gz"
options="suid"
builddir="$srcdir/sudo-$_realver"

# secfixes:
#   1.9.5p2-r0:
#     - CVE-2021-3156
#   1.9.5-r0:
#     - CVE-2021-23239
#     - CVE-2021-23240
#   1.8.31-r0:
#     - CVE-2019-18634
#   1.8.28-r0:
#     - CVE-2019-14287
#   1.8.20_p2-r0:
#     - CVE-2017-1000368

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexecdir=/usr/lib \
		--mandir=/usr/share/man \
		--disable-nls \
		--enable-pie \
		--with-env-editor \
		--with-mdoc \
		--without-pam \
		--without-skey \
		--with-sendmail=/usr/sbin/sendmail \
		--with-passprompt="[sudo] password for %p: "

	make
}

check() {
	make check
}

package() {
	# the sudo's mkinstalldir script miscreates the leading
	# path components with bad permissions. fix this.
	install -d -m0755 "$pkgdir"/var "$pkgdir"/var/db
	make -j1 DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/var/run

	# Exactly the same as /etc/sudoers
	rm "$pkgdir"/etc/sudoers.dist
}

sha512sums="
ad5c3d623547d1e3016e1a721676fee6d6b7348e77b2c234041e0af40c7220e8934c8c27beef0d12fa6df11708d37de711dacfefc135d26de46abca7f91c55d1  sudo-1.9.11p3.tar.gz
"