From f54bc416feffaba6977b184db5aaecacc545f519 Mon Sep 17 00:00:00 2001 From: Anke Date: Tue, 13 Nov 2012 03:52:25 +0000 Subject: [PATCH] procps-ng replacing procps, util-linux taking files from coreutils & shadow, updated all for furthr move to /usr/lib, e2fsprogs upate, not building yet --- coreutils/PKGBUILD | 4 +- coreutils/coreutils.install | 16 ++--- e2fsprogs/PKGBUILD | 42 +++++++------ ncurses/PKGBUILD | 41 +++++-------- procps-ng/PKGBUILD | 42 +++++++++++++ procps-ng/sysctl.conf | 41 +++++++++++++ shadow/PKGBUILD | 75 +++++++++++------------ shadow/chgpasswd | 6 +- shadow/defaults.pam | 10 +-- shadow/login | 18 ------ shadow/newusers | 10 +-- shadow/nscd-error-reporting.patch | 17 ----- shadow/shadow | 6 -- shadow/shadow-add-missing-include.patch | 11 ---- shadow/userdel-avoid-bad-mem-access.patch | 57 ----------------- shadow/write-utmp-wtmp-entries.patch | 47 -------------- util-linux/PKGBUILD | 64 ++++++++++++------- shadow/chsh => util-linux/pam-common | 0 util-linux/pam-login | 7 +++ util-linux/pam-su | 9 +++ util-linux/util-linux.install | 20 ++++++ util-linux/uuidd.tmpfiles | 1 + 22 files changed, 259 insertions(+), 285 deletions(-) create mode 100644 procps-ng/PKGBUILD create mode 100644 procps-ng/sysctl.conf delete mode 100644 shadow/login delete mode 100644 shadow/nscd-error-reporting.patch delete mode 100644 shadow/shadow delete mode 100644 shadow/shadow-add-missing-include.patch delete mode 100644 shadow/userdel-avoid-bad-mem-access.patch delete mode 100644 shadow/write-utmp-wtmp-entries.patch rename shadow/chsh => util-linux/pam-common (100%) create mode 100644 util-linux/pam-login create mode 100644 util-linux/pam-su create mode 100644 util-linux/util-linux.install create mode 100644 util-linux/uuidd.tmpfiles diff --git a/coreutils/PKGBUILD b/coreutils/PKGBUILD index 5701e9d92..5e65dbd41 100644 --- a/coreutils/PKGBUILD +++ b/coreutils/PKGBUILD @@ -5,9 +5,9 @@ pkgname=coreutils pkgver=8.20 -pkgrel=1 +pkgrel=2 pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system" -arch=('i686' 'x86_64') +arch=('x86_64') license=('GPL3') url="http://www.gnu.org/software/coreutils" groups=('base') diff --git a/coreutils/coreutils.install b/coreutils/coreutils.install index dff2dc5d4..22cfcb2a1 100644 --- a/coreutils/coreutils.install +++ b/coreutils/coreutils.install @@ -1,11 +1,9 @@ -infodir=/usr/share/info -filelist=(coreutils.info) +infodir=usr/share/info +file=coreutils.info post_install() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null - done + [[ -x usr/bin/install-info ]] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null } post_upgrade() { @@ -13,9 +11,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null - done + [[ -x usr/bin/install-info ]] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null } diff --git a/e2fsprogs/PKGBUILD b/e2fsprogs/PKGBUILD index 462110adb..10e74d56a 100644 --- a/e2fsprogs/PKGBUILD +++ b/e2fsprogs/PKGBUILD @@ -1,50 +1,54 @@ # # Core Packages for Chakra, part of chakra-project.org # -# maintainer (i686): Phil Miller -# maintainer (x86_64): Manuel Tortosa - -# include global config -source ../_buildscripts/${current_repo}-${_arch}-cfg.conf +# maintainer abveritas@chakra-project.org pkgname=e2fsprogs -pkgver=1.41.14 -pkgrel=2 +pkgver=1.42.6 +pkgrel=1 pkgdesc="Ext2/3/4 filesystem utilities" -arch=('i686' 'x86_64') +arch=('x86_64') license=('GPL' 'LGPL' 'MIT') url="http://e2fsprogs.sourceforge.net" groups=('base') -depends=('sh' 'util-linux-ng') +depends=('sh' 'util-linux') makedepends=('bc') source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" 'MIT-LICENSE') backup=('etc/mke2fs.conf') install=${pkgname}.install -sha1sums=('24f9364fa3d4c0d7d00cb627b819d0e51055d6c5' +sha1sums=('cd05cd4205a00d01a6da821660cff386788e9be3' 'f4a0d5b0cdb980e3fedd6f5e7dde0b0ffb7bbdfb') build() { cd "${srcdir}/${pkgname}-${pkgver}" # Remove unnecessary init.d directory - sed -i '/init\.d/s|^|#|' misc/Makefile.in || return 1 + sed -i '/init\.d/s|^|#|' misc/Makefile.in - ./configure --prefix=/usr --with-root-prefix="" --enable-elf-shlibs \ - --disable-fsck --disable-uuidd \ - --disable-libuuid --disable-libblkid || return 1 + ./configure --prefix=/usr \ + --with-root-prefix="" \ + --libdir=/usr/lib \ + --enable-elf-shlibs \ + --disable-fsck \ + --disable-uuidd \ + --disable-libuuid \ + --disable-libblkid + make +} - make || return 1 - make DESTDIR="${pkgdir}" install install-libs || return 1 +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install install-libs + + sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et" - sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et" || return 1 - # remove references to build directory sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds" sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et" # install MIT license install -Dm644 "${srcdir}/MIT-LICENSE" \ - "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE" || return 1 + "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE" } diff --git a/ncurses/PKGBUILD b/ncurses/PKGBUILD index db40faf33..c8c4cd846 100644 --- a/ncurses/PKGBUILD +++ b/ncurses/PKGBUILD @@ -1,14 +1,13 @@ # # Chakra Packages for Chakra, part of chakra-project.org # -# maintainer (i686): Phil Miller -# maintainer (x86_64): Manuel Tortosa +# maintainer abveritas[at]chakra-project[dot]org> pkgname=ncurses pkgver=5.9 -pkgrel=3 +pkgrel=4 pkgdesc="System V Release 4.0 curses emulation library" -arch=('i686' 'x86_64') +arch=('x86_64') url="http://www.gnu.org/software/ncurses/" license=('MIT') depends=('glibc') @@ -19,7 +18,7 @@ md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1' build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np0 -i "${srcdir}/gentoo-ncurses-5.9-rxvt-unicode-9.15.patch" + patch -p0 -i "${srcdir}/gentoo-ncurses-5.9-rxvt-unicode-9.15.patch" cd "${srcdir}" rm -rf ncurses{,w}-build && mkdir -p ncurses{,w}-build @@ -33,12 +32,13 @@ build() { --without-debug \ --without-ada \ --with-install-prefix="${pkgdir}" \ - --enable-widec - make || return 1 + --enable-widec \ + --enable-pc-files + make # libncurses.so.5 for external binary support cd ${srcdir}/ncurses-build - [ "${CARCH}" = 'x86_64' ] && CONFIGFLAG="--with-chtype=long" + CONFIGFLAG="--with-chtype=long" "${srcdir}/${pkgname}-${pkgver}/configure" \ --prefix=/usr \ --with-shared \ @@ -47,35 +47,25 @@ build() { --without-ada \ --with-install-prefix="${pkgdir}" \ "${CONFIGFLAG}" - make || return 1 + make } package() { cd "${srcdir}/ncursesw-build" make install - # move libraries needed for boot to /lib (we call tput in initscripts) - install -d -m755 "${pkgdir}/lib" - mv "${pkgdir}/usr/lib"/libncursesw.so.5* "${pkgdir}/lib" - ln -sf ../../lib/libncursesw.so.5 "${pkgdir}/usr/lib/libncursesw.so" - # Fool packages looking to link to non-wide-character ncurses libraries for lib in curses ncurses form panel menu ; do \ - rm -f "${pkgdir}/usr/lib/lib${lib}.so" ; \ echo "INPUT(-l${lib}w)" >"${pkgdir}/usr/lib/lib${lib}.so" ; \ - ln -sf "lib${lib}w.a" "${pkgdir}/usr/lib/lib${lib}.a" ; \ + ln -s "lib${lib}w.a" "${pkgdir}/usr/lib/lib${lib}.a" ; \ + done + ln -s libncurses++w.a "${pkgdir}/usr/lib/libncurses++.a" + + for lib in ncurses ncurses++ form panel menu; do + ln -s ${lib}w.pc ${pkgdir}/usr/lib/pkgconfig/${lib}.pc done - ln -sf libncurses++w.a "${pkgdir}/usr/lib/libncurses++.a" - - ############################################################################# - # Commented out, the systemd move will require things in /usr/bin anyway. - # - ## install tput to /bin - # install -d -m755 "${pkgdir}/bin" - # mv "${pkgdir}/usr/bin/tput" "${pkgdir}/bin/tput" # Some packages look for -lcurses during build - rm -f "${pkgdir}/usr/lib/libcursesw.so" echo "INPUT(-lncursesw)" >"${pkgdir}/usr/lib/libcursesw.so" ln -sf libncurses.so "${pkgdir}/usr/lib/libcurses.so" ln -sf libncursesw.a "${pkgdir}/usr/lib/libcursesw.a" @@ -93,4 +83,3 @@ package() { grep -B 100 '$Id' README > "${pkgdir}/usr/share/licenses/${pkgname}/license.txt" } -# vim:set ts=2 sw=2 et: diff --git a/procps-ng/PKGBUILD b/procps-ng/PKGBUILD new file mode 100644 index 000000000..f0ae41df7 --- /dev/null +++ b/procps-ng/PKGBUILD @@ -0,0 +1,42 @@ +# +# Core Packages for Chakra, part of chakra-project.org +# +# maintainer abveritas@chakra-project.org +# contributor Gaetan Bisson + +pkgname=procps-ng +pkgver=3.3.5 +pkgrel=1 +pkgdesc='Utilities for monitoring your system and its processes' +arch=('x86_64') +url="http://gitorious.org/procps" +license=('GPL' 'LGPL') +groups=('base') +depends=('ncurses') +conflicts=('procps') +provides=('procps') +replaces=('procps') +backup=('etc/sysctl.conf') +options=('!libtool') +source=("procps-ng-${pkgver}.tar.gz::http://gitorious.org/procps/procps/archive-tarball/v${pkgver}" + 'sysctl.conf') +sha1sums=('f591f2ff01f8866daf8999f45b797d18929b7aec' + '97ff07bab9aa5daa8d54a1346f73ba74f8e12a53') + +build() { + cd "${srcdir}/procps-procps" + echo ${pkgver} > .tarball-version + ./autogen.sh + ./configure --exec-prefix=/ --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib + make +} + +package() { + cd "${srcdir}/procps-procps" + make DESTDIR="${pkgdir}" install + install -D -m644 ../sysctl.conf "${pkgdir}/etc/sysctl.conf" + + # provided by util-linux + rm "${pkgdir}/bin/kill" + rm "${pkgdir}/usr/share/man/man1/kill.1" +} diff --git a/procps-ng/sysctl.conf b/procps-ng/sysctl.conf new file mode 100644 index 000000000..4695cdd92 --- /dev/null +++ b/procps-ng/sysctl.conf @@ -0,0 +1,41 @@ +# Configuration file for runtime kernel parameters. +# See sysctl.conf(5) for more information. + +# Have the CD-ROM close when you use it, and open when you are done. +#dev.cdrom.autoclose = 1 +#dev.cdrom.autoeject = 1 + +# Protection from the SYN flood attack. +net.ipv4.tcp_syncookies = 1 + +# See evil packets in your logs. +#net.ipv4.conf.all.log_martians = 1 + +# Never accept redirects or source routes (these are only useful for routers). +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv4.conf.all.accept_source_route = 0 +#net.ipv6.conf.all.accept_redirects = 0 +#net.ipv6.conf.all.accept_source_route = 0 + +# Disable packet forwarding. +net.ipv4.ip_forward = 0 +net.ipv6.conf.all.forwarding = 0 + +# Tweak the port range used for outgoing connections. +#net.ipv4.ip_local_port_range = 32768 61000 + +# Tweak those values to alter disk syncing and swap behavior. +#vm.vfs_cache_pressure = 100 +#vm.laptop_mode = 0 +#vm.swappiness = 60 + +# Tweak how the flow of kernel messages is throttled. +#kernel.printk_ratelimit_burst = 10 +#kernel.printk_ratelimit = 5 + +# Reboot 600 seconds after kernel panic or oops. +#kernel.panic_on_oops = 1 +#kernel.panic = 600 + +# Disable SysRq key to avoid console security issues. +kernel.sysrq = 0 diff --git a/shadow/PKGBUILD b/shadow/PKGBUILD index e04ec05bf..946c2ab02 100644 --- a/shadow/PKGBUILD +++ b/shadow/PKGBUILD @@ -5,18 +5,18 @@ # maintainer Manuel Tortosa pkgname=shadow -pkgver=4.1.5 +pkgver=4.1.5.1 pkgrel=1 pkgdesc="Password and account management tool suite with support for shadow files and PAM" -arch=('i686' 'x86_64') +arch=('x86_64') url='http://pkg-shadow.alioth.debian.org/' license=('BSD') groups=('base') depends=('bash' 'pam' 'acl') backup=(etc/login.defs - etc/pam.d/{chage,login,passwd,shadow,useradd,usermod,userdel} + etc/pam.d/{chage,passwd,shadow,useradd,usermod,userdel} etc/pam.d/{chpasswd,newusers,groupadd,groupdel,groupmod} - etc/pam.d/{chfn,chgpasswd,groupmems,chsh} + etc/pam.d/{chgpasswd,groupmems} etc/default/useradd) options=('!libtool') install='shadow.install' @@ -26,37 +26,27 @@ source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{ chgpasswd chpasswd defaults.pam - login login.defs newusers passwd shadow.cron.daily useradd.defaults - nscd-error-reporting.patch xstrdup.patch - shadow-strncpy-usage.patch - shadow-add-missing-include.patch - userdel-avoid-bad-mem-access.patch - write-utmp-wtmp-entries.patch) -sha1sums=('3ab1ae0e30af36d04445314fcb5a079bdf05de41' - '0a31aafceb948a91fe7370a6378cafd6fd883145' + shadow-strncpy-usage.patch) +sha1sums=('81f38720b953ef9c2c100c43d02dfe19cafd6c30' + '126570e2939bf3b57f28df5197ab9309747a6b5c' '7ab316761036787c0cfcb53b7a6e82da7c373123' 'cdb0ec4dc094a091c1053d74b4b6cb89327362dc' - '6e8bf283fdd4e7abe33977e8592ace015e1e1258' + '4ad0e059406a305c8640ed30d93c2a1f62c2f4ad' '87186f6e5e00d195cafba5e38400418481dce3af' - 'b7ad3814f6efb69b4187963a9da4ba646a62cfbd' - '92fc47f8e4d15d51e7120b788eb53ed6340d2cf8' + '0e56fed7fc93572c6bf0d8f3b099166558bb46f1' 'e5cab2118ecb1e61874cde842d7d04d1003f35cb' - '4fdcce75295b15c37368a0c0a41d9bdc15451dad' + '12427b1ca92a9b85ca8202239f0d9f50198b818f' '49cb1b18af9d2ae7cc4a2441f1a6951d313f7c60' '5d83ba7e11c765c951867cbe00b0ae7ff57148fa' '80e3d2ee8c990c2f7fbd0dcf406a9e41cbe66fe2' - '72ac0cca1905d5fd7e212833965f8a241f79f941' '6010fffeed1fc6673ad9875492e1193b1a847b53' - '3bc0e0968ddec0e58b1e2de88d9d0065c93d60c9' - '0697a21f7519de30821da7772677035652df4ad2' - 'cab01cf46f810074d84d246f28e5860f91d53078' - 'b93db39a9f0b62b46a3765605c16786e61f0a545') + '3bc0e0968ddec0e58b1e2de88d9d0065c93d60c9') build() { cd "$pkgname-$pkgver" @@ -68,18 +58,8 @@ build() { LDFLAGS+=" -lcrypt" # need to offer these upstream - patch -Np1 <"$srcdir/xstrdup.patch" - patch -Np1 <"$srcdir/shadow-strncpy-usage.patch" - - # backports queued for 4.1.5.1 - patch -Np1 <"$srcdir/shadow-add-missing-include.patch" - patch -Np1 <"$srcdir/nscd-error-reporting.patch" - - # sent to ML - patch -Np0 <"$srcdir/userdel-avoid-bad-mem-access.patch" - - # revert - patch -RNp1 <"$srcdir/write-utmp-wtmp-entries.patch" + patch -p1 <"$srcdir/xstrdup.patch" + patch -p1 <"$srcdir/shadow-strncpy-usage.patch" # supress etc/pam.d/*, we provide our own sed -i '/^SUBDIRS/s/pam.d//' etc/Makefile.in @@ -117,18 +97,37 @@ package() { # PAM config - custom install -dm755 "$pkgdir/etc/pam.d" - install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{login,passwd,chgpasswd,chpasswd,newusers} + install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{passwd,chgpasswd,chpasswd,newusers} # PAM config - from tarball install -Dm644 etc/pam.d/groupmems "$pkgdir/etc/pam.d/groupmems" # we use the 'useradd' PAM file for other similar utilities - for file in chage chfn chsh groupadd groupdel groupmod shadow \ + for file in chage groupadd groupdel groupmod shadow \ useradd usermod userdel; do install -Dm644 "$srcdir/defaults.pam" "$pkgdir/etc/pam.d/$file" done - # Remove su - using su from coreutils instead - rm "$pkgdir/bin/su" - find "$pkgdir/usr/share/man" -name 'su.1' -delete + # Remove utilities provided by util-linux + rm \ + "$pkgdir"/usr/bin/{chsh,chfn,sg} \ + "$pkgdir"/bin/{login,su} \ + "$pkgdir"/usr/sbin/{vipw,vigr} + + # but we keep newgrp, as sg is really an alias to it + mv "$pkgdir"/usr/bin/{newgrp,sg} + + # ...and their many man pages + find "$pkgdir"/usr/share/man \ + '(' -name 'chsh.1' -o \ + -name 'chfn.1' -o \ + -name 'su.1' -o \ + -name 'login.1' -o \ + -name 'vipw.8' -o \ + -name 'vigr.8' -o \ + -name 'newgrp.1' ')' \ + -delete + rmdir \ + "$pkgdir"/usr/share/man/{fi,id,zh_TW}/man1 \ + "$pkgdir"/usr/share/man/{fi,ko/man8} } diff --git a/shadow/chgpasswd b/shadow/chgpasswd index 0cc5ca865..8f49f5cc8 100644 --- a/shadow/chgpasswd +++ b/shadow/chgpasswd @@ -1,4 +1,4 @@ #%PAM-1.0 -auth sufficient pam_rootok.so -account required pam_permit.so -password include system-auth +auth sufficient pam_rootok.so +account required pam_permit.so +password include system-auth diff --git a/shadow/defaults.pam b/shadow/defaults.pam index 07c6fdf5f..a7bf8a4a5 100644 --- a/shadow/defaults.pam +++ b/shadow/defaults.pam @@ -1,6 +1,6 @@ #%PAM-1.0 -auth sufficient pam_rootok.so -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so -password required pam_permit.so +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_permit.so diff --git a/shadow/login b/shadow/login deleted file mode 100644 index 24ddc0b27..000000000 --- a/shadow/login +++ /dev/null @@ -1,18 +0,0 @@ -#%PAM-1.0 -auth required pam_securetty.so -auth requisite pam_nologin.so -auth required pam_unix.so nullok -auth required pam_tally.so onerr=succeed file=/var/log/faillog -# use this to lockout accounts for 10 minutes after 3 failed attempts -#auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog -account required pam_access.so -account required pam_time.so -account required pam_unix.so -#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 -#password required pam_unix.so md5 shadow use_authtok -session required pam_unix.so -session required pam_env.so -session required pam_motd.so -session required pam_limits.so -session optional pam_mail.so dir=/var/spool/mail standard -session optional pam_lastlog.so diff --git a/shadow/newusers b/shadow/newusers index 7dea598c7..5d447985a 100644 --- a/shadow/newusers +++ b/shadow/newusers @@ -1,6 +1,6 @@ #%PAM-1.0 -auth sufficient pam_rootok.so -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so -password required pam_unix.so sha512 shadow +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_unix.so sha512 shadow diff --git a/shadow/nscd-error-reporting.patch b/shadow/nscd-error-reporting.patch deleted file mode 100644 index 60607be3b..000000000 --- a/shadow/nscd-error-reporting.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/upstream/trunk/lib/nscd.c b/upstream/trunk/lib/nscd.c -index 227c205..7adb58f 100644 ---- a/lib/nscd.c -+++ b/lib/nscd.c -@@ -39,8 +39,11 @@ int nscd_flush_cache (const char *service) - /* nscd is not installed, or it is installed but uses an - interpreter that is missing. Probably the former. */ - return 0; -+ } else if (code == 1) { -+ /* nscd is installed, but it isn't active. */ -+ return 0; - } else if (code != 0) { -- (void) fprintf (stderr, _("%s: nscd exited with status %d"), -+ (void) fprintf (stderr, _("%s: nscd exited with status %d\n"), - Prog, code); - (void) fprintf (stderr, _(MSG_NSCD_FLUSH_CACHE_FAILED), Prog); - return -1; diff --git a/shadow/shadow b/shadow/shadow deleted file mode 100644 index a7bf8a4a5..000000000 --- a/shadow/shadow +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so -password required pam_permit.so diff --git a/shadow/shadow-add-missing-include.patch b/shadow/shadow-add-missing-include.patch deleted file mode 100644 index 5c9e946ef..000000000 --- a/shadow/shadow-add-missing-include.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur shadow-4.1.4.2+svn3283/libmisc/copydir.c shadow-4.1.4.2+svn3283.new/libmisc/copydir.c ---- shadow-4.1.4.2+svn3283/libmisc/copydir.c 2010-09-05 11:35:26.000000000 -0400 -+++ shadow-4.1.4.2+svn3283.new/libmisc/copydir.c 2011-06-26 01:26:52.000000000 -0400 -@@ -34,6 +34,7 @@ - - #ident "$Id: copydir.c 3283 2010-09-05 15:34:42Z nekral-guest $" - -+#include - #include - #include - #include diff --git a/shadow/userdel-avoid-bad-mem-access.patch b/shadow/userdel-avoid-bad-mem-access.patch deleted file mode 100644 index 80148a24d..000000000 --- a/shadow/userdel-avoid-bad-mem-access.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: src/userdel.c -=================================================================== ---- src/userdel.c (revision 3713) -+++ src/userdel.c (working copy) -@@ -329,26 +329,33 @@ - } - - if (NULL == pwd) { -+ char gr_name[GROUP_NAME_MAX_LENGTH + 1]; -+ -+ /* make a copy of the group name before we delete it. -+ * we can't use ->gr_name after the group is deleted -+ * for logging purposes */ -+ snprintf(gr_name, GROUP_NAME_MAX_LENGTH, "%s", grp->gr_name); -+ - /* - * We can remove this group, it is not the primary - * group of any remaining user. - */ -- if (gr_remove (grp->gr_name) == 0) { -+ if (gr_remove (gr_name) == 0) { - fprintf (stderr, - _("%s: cannot remove entry '%s' from %s\n"), -- Prog, grp->gr_name, gr_dbname ()); -+ Prog, gr_name, gr_dbname ()); - fail_exit (E_GRP_UPDATE); - } - - #ifdef WITH_AUDIT - audit_logger (AUDIT_DEL_GROUP, Prog, - "deleting group", -- grp->gr_name, AUDIT_NO_ID, -+ gr_name, AUDIT_NO_ID, - SHADOW_AUDIT_SUCCESS); - #endif /* WITH_AUDIT */ - SYSLOG ((LOG_INFO, - "removed group '%s' owned by '%s'\n", -- grp->gr_name, user_name)); -+ gr_name, user_name)); - - #ifdef SHADOWGRP - if (sgr_locate (user_name) != NULL) { -@@ -361,12 +368,12 @@ - #ifdef WITH_AUDIT - audit_logger (AUDIT_DEL_GROUP, Prog, - "deleting shadow group", -- grp->gr_name, AUDIT_NO_ID, -+ gr_name, AUDIT_NO_ID, - SHADOW_AUDIT_SUCCESS); - #endif /* WITH_AUDIT */ - SYSLOG ((LOG_INFO, - "removed shadow group '%s' owned by '%s'\n", -- grp->gr_name, user_name)); -+ gr_name, user_name)); - - } - #endif /* SHADOWGRP */ diff --git a/shadow/write-utmp-wtmp-entries.patch b/shadow/write-utmp-wtmp-entries.patch deleted file mode 100644 index 6c81d1698..000000000 --- a/shadow/write-utmp-wtmp-entries.patch +++ /dev/null @@ -1,47 +0,0 @@ -Index: upstream/trunk/src/login.c -=================================================================== ---- a/src/login.c (revision 3437) -+++ b/src/login.c (revision 3438) -@@ -126,10 +126,12 @@ - static void setup_tty (void); - static void process_flags (int argc, char *const *argv); - static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *user); -+#ifndef USE_PAM - static void update_utmp (const char *user, - const char *tty, - const char *host, - /*@null@*/const struct utmp *utent); -+#endif /* ! USE_PAM */ - - #ifndef USE_PAM - static struct faillog faillog; -@@ -471,6 +473,7 @@ - return failent_user; - } - -+#ifndef USE_PAM - /* - * update_utmp - Update or create an utmp entry in utmp, wtmp, utmpw, and - * wtmpx -@@ -496,6 +499,7 @@ - free (utx); - #endif /* USE_UTMPX */ - } -+#endif /* ! USE_PAM */ - - /* - * login - create a new login session for a user -@@ -1208,11 +1212,13 @@ - } - } - -+#ifndef USE_PAM - /* - * The utmp entry needs to be updated to indicate the new status - * of the session, the new PID and SID. - */ - update_utmp (username, tty, hostname, utent); -+#endif /* ! USE_PAM */ - - /* The pwd and spwd entries for the user have been copied. - * diff --git a/util-linux/PKGBUILD b/util-linux/PKGBUILD index fb14173c8..75bdbca56 100644 --- a/util-linux/PKGBUILD +++ b/util-linux/PKGBUILD @@ -5,40 +5,57 @@ # maintainer Manuel Tortosa pkgname=util-linux -pkgver=2.21.2 -pkgrel=2 +pkgver=2.22.1 +pkgrel=1 pkgdesc="Miscellaneous system utilities for Linux" url="http://www.kernel.org/pub/linux/utils/util-linux/" -arch=('i686' 'x86_64') +arch=('x86_64') groups=('base') -depends=('pam') -conflicts=('util-linux-ng') -provides=("util-linux-ng=${pkgver}") +depends=('pam' 'shadow' 'coreutils' 'glibc') +makedepend=('bc') +conflicts=('util-linux-ng' 'eject') +provides=("util-linux-ng=${pkgver}" 'eject') license=('GPL2') options=('!libtool') -source=("ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.21/${pkgname}-${pkgver}.tar.xz") -md5sums=('54ba880f1d66782c2287ee2c898520e9') +source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.22/${pkgname}-${pkgver}.tar.xz + uuidd.tmpfiles + pam-login + pam-common + pam-su) +backup=(etc/pam.d/chfn + etc/pam.d/chsh + etc/pam.d/login + etc/pam.d/su + etc/pam.d/su-l) +install=util-linux.install +md5sums=('730cf9932531ed09b53a04ca30fcb4c9' + 'a39554bfd65cccfd8254bb46922f4a67' + '4368b3f98abd8a32662e094c54e7f9b1' + 'a31374fef2cba0ca34dfc7078e2969e4' + 'fa85e5cce5d723275b14365ba71a8aad') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr \ --libdir=/usr/lib \ - --disable-wall \ + --localstatedir=/run \ --enable-fs-paths-extra=/usr/bin:/usr/sbin \ --enable-write \ --enable-raw \ - --enable-new-mount \ - --enable-rename \ - --enable-schedutils \ - --disable-login-utils + --enable-vipw \ + --enable-newgrp \ + --enable-chfn-chsh \ + --enable-mesg \ + --enable-socket-activation make } -check() { - make -C "${pkgname}-${pkgver}" check -} +# only bc test fails, leaving dep to test the rest +#check() { +# make -C "${pkgname}-${pkgver}" check +#} package() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -46,12 +63,17 @@ package() { make DESTDIR="${pkgdir}" install cd "${pkgdir}" + + chmod 4755 "$pkgdir"/usr/bin/{newgrp,ch{sh,fn}} - # broken tool, going away in next major release, so just remove it now - rm "${pkgdir}"/usr/{bin/chkdupexe,share/man/man1/chkdupexe.1} + install -Dm644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chfn" + install -m644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chsh" + install -m644 "$srcdir/pam-login" "$pkgdir/etc/pam.d/login" + install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su" + install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su-l" - # delete stray empty dir, fixed upstream - rm -r usr/share/man/ru + install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf" } -# vim:set ts=2 sw=2 et: + + diff --git a/shadow/chsh b/util-linux/pam-common similarity index 100% rename from shadow/chsh rename to util-linux/pam-common diff --git a/util-linux/pam-login b/util-linux/pam-login new file mode 100644 index 000000000..1960d9497 --- /dev/null +++ b/util-linux/pam-login @@ -0,0 +1,7 @@ +#%PAM-1.0 + +auth required pam_securetty.so +auth requisite pam_nologin.so +auth include system-local-login +account include system-local-login +session include system-local-login diff --git a/util-linux/pam-su b/util-linux/pam-su new file mode 100644 index 000000000..cf15f40f1 --- /dev/null +++ b/util-linux/pam-su @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +# Uncomment the following line to implicitly trust users in the "wheel" group. +#auth sufficient pam_wheel.so trust use_uid +# Uncomment the following line to require a user to be in the "wheel" group. +#auth required pam_wheel.so use_uid +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so diff --git a/util-linux/util-linux.install b/util-linux/util-linux.install new file mode 100644 index 000000000..969a4aecf --- /dev/null +++ b/util-linux/util-linux.install @@ -0,0 +1,20 @@ +post_install() { + # we don't want use systemd-tmpfiles here because + # the package dependency would create a circular dep. + if [ ! -d run/uuidd ]; then + install -o uuidd -g uuidd -dm755 run/uuidd + fi +} + +post_upgrade() { + if [ "$(vercmp $2 2.21.2-4)" -lt 0 ]; then + if [ -f /var/lib/hwclock/adjtime ]; then + mv /var/lib/hwclock/adjtime /etc/adjtime + fi + if [ -d /var/lib/hwclock ]; then + rmdir /var/lib/hwclock + fi + fi + + post_install +} diff --git a/util-linux/uuidd.tmpfiles b/util-linux/uuidd.tmpfiles new file mode 100644 index 000000000..b059cfe65 --- /dev/null +++ b/util-linux/uuidd.tmpfiles @@ -0,0 +1 @@ +d /run/uuidd 0755 uuidd uuidd