# HG changeset patch # User Pascal Bellard # Date 1510149094 -3600 # Node ID 204470f08d82a2b07844a0d4d0e0f5c53509e4c2 # Parent d2dfaae2aa88bb5fea8233d8e730316ee915a0b0 remove netatalk-pam, partimage-pam, openssh-pam diff -r d2dfaae2aa88 -r 204470f08d82 netatalk-pam/receipt --- a/netatalk-pam/receipt Wed Nov 08 14:41:47 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="netatalk-pam" -VERSION="2.2.3" -CATEGORY="system-tools" -SHORT_DESC="The AppleTalk Protocol Suite using PAM." -MAINTAINER="pascal.bellard@slitaz.org" -LICENSE="GPL2" -SOURCE="netatalk" -TARBALL="$SOURCE-$VERSION.tar.bz2" -WEB_SITE="http://netatalk.sourceforge.net/" -WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL" -CONFIG_FILES="/etc/netatalk/AppleVolumes.* /etc/netatalk/*.conf" -PROVIDE="netatalk:pam" - -DEPENDS="perl libdb libcrypto cups gnutls libgcrypt libgpg-error \ -libwrap zlib pam libcomerr3" -BUILD_DEPENDS="db-dev libcrypto-dev pam pam-dev file" - -# Rules to configure and make the package. -compile_rules() -{ - cd $src - ./configure --with-pam --prefix=/usr --sysconfdir=/etc \ - --libexecdir=/usr/lib/netatalk \ - --mandir=/usr/share/man $CONFIGURE_ARGS && - make && - make DESTDIR=$DESTDIR install -} - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr/share $fs/usr/lib - cp -a $install/usr/bin $fs/usr - cp -a $install/usr/sbin $fs/usr - #cp -a $install/usr/lib/netatalk $fs/usr/lib - cp -a $install/etc $fs - cp -a $stuff/etc $fs - rm -f $fs/etc/netatalk/uams/*a -} - -# Pre and post install commands for Tazpkg. -post_install() -{ - cat < $PIDFILE - - # register workstation - nbprgstr -p 4 "$ATALK_NAME:Workstation$ATALK_ZONE" - nbprgstr -p 4 "$ATALK_NAME:netatalk$ATALK_ZONE" - - [ "$PAPD_RUN" == "yes" ] && papd - [ "$TIMELORD_RUN" == "yes" ] && timelord - fi - - [ "$AFPD_RUN" == "yes" ] && afpd $AFPD_UAMLIST -g $AFPD_GUEST \ - -c $AFPD_MAX_CLIENTS -n "$ATALK_NAME$ATALK_ZONE" -} - -case "$1" in - start) - if active_pidfile $PIDFILE $NAME ; then - _ '%s is already running.' $NAME - exit 1 - fi - action 'Starting %s: %s...' "$DESC" $NAME - if [ "$ATALK_BGROUND" == "yes" ]; then - atalk_startup >/dev/null & - else - atalk_startup - fi - status - ;; - stop) - if ! active_pidfile $PIDFILE $NAME ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Stopping %s: %s...' "$DESC" $NAME - killall afpd - killall papd - killall timelord - killall atalkd - status - ;; - restart) - $0 start - sleep 2 - $0 stop - ;; - *) - emsg "$(_ 'Usage:') $0 [start|stop|restart]" - newline - exit 1 - ;; -esac - -exit 0 diff -r d2dfaae2aa88 -r 204470f08d82 netatalk-pam/stuff/etc/pam.d/netatalk --- a/netatalk-pam/stuff/etc/pam.d/netatalk Wed Nov 08 14:41:47 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#%PAM-1.0 -# specify the PAM netatalk behaviour - -auth required pam_unix.so shadow -account required pam_unix.so -password required pam_unix.so md5 shadow use_authtok -session required pam_unix.so diff -r d2dfaae2aa88 -r 204470f08d82 netatalk/receipt --- a/netatalk/receipt Wed Nov 08 14:41:47 2017 +0100 +++ b/netatalk/receipt Wed Nov 08 14:51:34 2017 +0100 @@ -1,4 +1,4 @@ -# SliTaz package receipt. +# SliTaz package receipt v2. PACKAGE="netatalk" VERSION="2.2.3" @@ -11,45 +11,80 @@ WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" CONFIG_FILES="/etc/netatalk/AppleVolumes.* /etc/netatalk/*.conf" -DEPENDS="perl libdb libcrypto cups gnutls libgcrypt libgpg-error \ -libwrap zlib libcomerr3" -BUILD_DEPENDS="db-dev libcrypto-dev file" +BUILD_DEPENDS="db-dev libcrypto-dev file pam-dev" +SPLIT="netatalk netatalk-pam" # Rules to configure and make the package. compile_rules() { - cd $src - #sed -i -e 's/pam =/pam_x =/' -e 's/USE_PAM, 1,/USE_PAM, 0,/' \ - # -e 's/pam_so =/pam_so_x =/' configure.in + cp -a $src $src-pam ./configure --without-pam --prefix=/usr --sysconfdir=/etc \ - --libexecdir=/usr/lib/netatalk \ - --mandir=/usr/share/man $CONFIGURE_ARGS && + --libexecdir=/usr/lib/netatalk \ + --mandir=/usr/share/man $CONFIGURE_ARGS && make && make DESTDIR=$DESTDIR install + + cd $src-pam + ./configure --with-pam --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/netatalk \ + --mandir=/usr/share/man $CONFIGURE_ARGS && + make && + make DESTDIR=$DESTDIR-pam install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + DEPENDS="perl libdb libcrypto cups gnutls libgcrypt libgpg-error \ + libwrap zlib libcomerr3" + [ $PACKAGE == netatalk-pam ] && DEPENDS="$DEPENDS pam" && + PROVIDE="netatalk:pam" && CAT="system-tools|using PAM" && + install=$install-pam mkdir -p $fs/usr/share $fs/usr/lib cp -a $install/usr/bin $fs/usr cp -a $install/usr/sbin $fs/usr #cp -a $install/usr/lib/netatalk $fs/usr/lib cp -a $install/etc $fs cp -a $stuff/etc $fs + [ $PACKAGE == netatalk-pam ] || rm -rf $fs/etc/pam.d rm -f $fs/etc/netatalk/uams/*a } # Pre and post install commands for Tazpkg. -post_install() +pre_install_netatalk() { + rm -f "$1/usr/bin/timeout" +} + +post_install_netatalk() +{ + ln -s /bin/busybox "$1/usr/bin/timeout" cat <> $fs/etc/ssh/ssh_config <> "$1/etc/inetd.conf" < "$1$openssh.pub" - chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint - done <> $install/etc/ssh/ssh_config <> $inst/etc/ssh/ssh_config <> "$1/etc/inetd.conf" < "$1$openssh.pub" + chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint + done < - #endif - -+ - #include - #include - #include -+#include - - #define __STDC_FORMAT_MACROS - #include ---- partimage-0.6.7-ori/src/client/misc.cpp Sun Feb 3 21:58:00 2008 -+++ partimage-0.6.7/src/client/misc.cpp Fri Sep 25 15:14:39 2009 -@@ -24,6 +24,7 @@ - #include - #define __STDC_FORMAT_MACROS - #include -+#include - - #ifdef HAVE_SYS_PARAM_H - #include -@@ -2372,7 +2373,7 @@ - - static char *sfdisk_line_to_partition_device(const char *line) - { -- if (char *p = strchr(line, ':')) { -+ if (const char *p = strchr(line, ':')) { - while (p[-1] == ' ' && p > line) p--; - return strndup(line, p - line); - } else { ---- partimage-0.6.7-ori/src/server/partimaged-main.cpp Sun Feb 3 21:57:53 2008 -+++ partimage-0.6.7/src/server/partimaged-main.cpp Thu Sep 24 10:31:42 2009 -@@ -27,7 +27,7 @@ - - #include - #include --#include -+#include - #include - #include - #include ---- partimage-0.6.7-ori/src/server/partimaged.cpp Sun Feb 3 21:57:53 2008 -+++ partimage-0.6.7/src/server/partimaged.cpp Thu Sep 24 10:32:08 2009 -@@ -22,7 +22,7 @@ - - #include - #include --#include -+#include - - #include "net.h" - #include "netserver.h" ---- partimage-0.6.7-ori/src/shared/net.h Sun Feb 3 21:57:55 2008 -+++ partimage-0.6.7/src/shared/net.h Thu Sep 24 10:32:35 2009 -@@ -28,7 +28,7 @@ - #include - #include - #include --#include -+#include - #include - - #include "pathnames.h" diff -r d2dfaae2aa88 -r 204470f08d82 partimage/receipt --- a/partimage/receipt Wed Nov 08 14:41:47 2017 +0100 +++ b/partimage/receipt Wed Nov 08 14:51:34 2017 +0100 @@ -1,43 +1,70 @@ -# SliTaz package receipt. +# SliTaz package receipt v2. PACKAGE="partimage" VERSION="0.6.9" CATEGORY="system-tools" -SHORT_DESC="Saves partitions in an image file." +SHORT_DESC="Saves partitions in an image file" MAINTAINER="erjo@slitaz.org" LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.bz2" WEB_SITE="http://www.partimage.org/Index.fr.html" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" -DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" -BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev" +BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev pam-dev" +SPLIT="partimage partimage-pam" # Rules to configure and make the package. compile_rules() { sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp + cp -a $src $src-pam ./configure \ --prefix=/usr \ + --disable-pam \ --sysconfdir=/etc \ --infodir=/usr/share/info \ --mandir=/usr/share/man $CONFIGURE_ARGS && make && make DESTDIR=$DESTDIR install + + cd $src-pam + ./configure \ + --prefix=/usr \ + --enable-pam \ + --sysconfdir=/etc \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man $CONFIGURE_ARGS && + make && + make DESTDIR=$DESTDIR-pam install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged - cp -a $install/usr/sbin $fs/usr - cp -a $install/etc $fs/ - install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged - install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d + case $PACKAGE in + partimage) + DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" + mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged + cp -a $install/usr/sbin $fs/usr + cp -a $install/etc $fs/ + install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged + install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d + ;; + partimage-pam) + CAT="system-tools|using PAM" + PROVIDE="partimage:pam" + DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base" + mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged + cp -a $install-pam/usr/sbin $fs/usr + cp -a $install-pam/etc $fs/ + install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged + install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d + ;; + esac } -post_install() +post_install_partimage() { echo echo "Adding user/group partimag..." @@ -51,12 +78,12 @@ chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged" echo "" - echo -e "\nTo starts $PACKAGE server you can run :\n" + echo -e "\nTo starts partimage server you can run :\n" echo "/etc/init.d/partimaged start" echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" } -post_remove() +post_remove_partimage() { chroot "$1/" deluser partimag chroot "$1/" delgroup partimag @@ -65,3 +92,32 @@ rm -rf "$1/etc/partimaged" fi } + +post_install_partimage_pam() +{ + echo + echo "Adding user/group partimag..." + chroot "$1/" adduser -S -H -D partimag + + echo "Setting permissions for config files" + chmod 0600 "$1"/etc/partimaged/* + chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/* + + echo "Creating image files directory" + chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged" + + echo "" + echo -e "\nTo starts partimage server you can run :\n" + echo "/etc/init.d/partimaged start" + echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" +} + +post_remove_partimage_pam() +{ + chroot "$1/" deluser partimag + chroot "$1/" delgroup partimag + + if [ -f "$1/etc/paritimaged" ]; then + rm -rf "$1/etc/partimaged" + fi +}