X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2C653861026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1596455719; bh=veXKApQM9MOnpfolrrUPdjuzhm1C/gHLFpKStOBtGZY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=XdpBGAwJJb1CTVHV7/bofw92F7qTEjbgTfaRNQuwU2Yf9UhbTxansmrCYQJqRXq4u RQ2GX9ZdY992xdBdPLsy6ZEfL7PjGSKID2qI99OoKTmzwCK4SGoquoClgf0jkaUVYS Cd6rT2Z8AToH4QllMu9U/lcBiFTrcw9dNP6ON4Z4= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4E05D3858D35 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=vvIQzpmVuKgr3pz+2Rj/nzv0cHlWbfeQHV+r1V6fFFk=; b=avwldXWkKSuJKOy0LDL/E1bfxcMzbr5Omqhdl9p6AtmBsQlSB0HqjiU0Vc+IG8pFcK ONGCERZ4x+5crJKVHmiBWi5oOdu4NM1BK5MxjhKswgMJlmJSGXeJCAqkHTBYtKCBEtgU pLzkcyVqxzqqEY1k8R7bWCPGKO0Irbz/KYB7l9Dz6u7Xw77BwGuC2VgMRKgcDLKg1Mo2 xgEt4Bl1rz2Crn2zu/U6EqoAx2PdWj6uEPPS3xTqz+5eE4iWm2gVThc8dNAOMetgqdBn kA6q7g0JzPspoWp/Rn058q1OCAZuqtp7PL+mvRqfigrvFgzoDi4GHTOWqCAGiGba04S6 l86g== X-Gm-Message-State: AOAM533vAKurOFaTLZ7OO4sJ+ugzzlfJsLmVvSU5rolZw7qoyxFFGhlL SmP6xMik9h43wtVFFwBBrGbi9dip X-Google-Smtp-Source: ABdhPJzFlJLKtn551oMtB9iPfj1Yix79I3iGiD2XkZiM8wvfMQWEQfbR0uQMAu/Y2kIN+CzEoLirYA== X-Received: by 2002:a62:e202:: with SMTP id a2mr15207175pfi.140.1596455716113; Mon, 03 Aug 2020 04:55:16 -0700 (PDT) Date: Mon, 03 Aug 2020 20:55:15 +0900 To: cygwin AT cygwin DOT com Subject: cygport: Request a new feature in order to set owner/group names in packaged tarballs. Message-Id: <20200803205512.E3F1.50F79699@gmail.com> MIME-Version: 1.0 X-Mailer: Becky! ver. 2.75.01 [ja] X-Antivirus: Avast (VPS 200803-0, 2020/08/03), Outbound message X-Antivirus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Lemures Lemniscati via Cygwin Reply-To: Lemures Lemniscati Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi! This is another patch, so that cygport shall make tarballs with specified owner and group names. e.g.) Invoke like this: PKG_OWNER_GROUP=lovely/cygwin cygport fabulous.cygport package and we'll get tarballs with a owner name 'lovely' and a group name 'cygwin'. But, there may be more suitable names for variables other than PKG_OWNER_GROUP, PKG_OWNER, PKG_GROUP... Regards, Lem ==== diff -ur a/cygport-0.34.0/lib/pkg_pkg.cygpart c/cygport-0.34.0/lib/pkg_pkg.cygpart --- a/cygport-0.34.0/lib/pkg_pkg.cygpart 2020-05-11 01:06:43.000000000 +0900 +++ c/cygport-0.34.0/lib/pkg_pkg.cygpart 2020-08-03 20:13:37.954717700 +0900 @@ -19,6 +19,16 @@ # along with cygport. If not, see . # ################################################################################ +# If PKG_OWNER_GROUP is nonempty, we split it into PKG_OWNER and PKG_GROUP +if [ -n "${PKG_OWNER_GROUP}" ]; then + PKG_OWNER=${PKG_OWNER_GROUP%%/*} + PKG_GROUP=${PKG_OWNER_GROUP##*/} +fi +# If PKG_OWNER and PKG_GROUP are respectively nonempty, +# set tar options to TAR_OWNER and TAR_GROUP respectively, +# which is to be used when creating archives. +[ -z "${PKG_OWNER}" ] && TAR_OWNER= || TAR_OWNER="--owner=${PKG_OWNER}" +[ -z "${PKG_GROUP}" ] && TAR_GROUP= || TAR_GROUP="--group=${PKG_GROUP}" #****** Chapter 12/Packaging # INTRODUCTION @@ -170,7 +180,7 @@ if defined pkg_contents then mkdir -p ${distdir}/${PN}/${distsubdir}; - tar Jcvf ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.tar.xz \ + tar ${TAR_OWNER} ${TAR_GROUP} -Jcvf ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.tar.xz \ --exclude=usr/lib/debug --exclude=usr/src \ --exclude=${autoloaddir} \ ${pkg_contents} \ @@ -179,7 +189,7 @@ else inform "Creating empty package" mkdir -p ${distdir}/${PN}/${distsubdir}; - tar -Jcf ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.tar.xz --files-from /dev/null \ + tar ${TAR_OWNER} ${TAR_GROUP} -Jcf ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.tar.xz --files-from /dev/null \ || error "Empty package creation failed" > ${T}/.${pkg_name[${n}]}.lst fi @@ -194,7 +204,7 @@ __step "${PN}-debuginfo-${PVR}.tar.xz"; mkdir -p ${distdir}/${PN}/${PN}-debuginfo; - tar Jcvf ${distdir}/${PN}/${PN}-debuginfo/${PN}-debuginfo-${PVR}.tar.xz \ + tar ${TAR_OWNER} ${TAR_GROUP} -Jcvf ${distdir}/${PN}/${PN}-debuginfo/${PN}-debuginfo-${PVR}.tar.xz \ usr/*/debug/ ${autoloaddir} ${!dbg_contents_var} \ | tee ${T}/.${PN}-debuginfo.lst \ || error "Debuginfo package creation failed: ${PN}-debuginfo" @@ -519,7 +529,7 @@ cd ${spkgdir%/*}; - tar Jcvf ${distdir}/${PN}/${PF}-src.tar.xz ${spkgdir##*/}/ || error "Source package creation failed" + tar ${TAR_OWNER} ${TAR_GROUP} -Jcvf ${distdir}/${PN}/${PF}-src.tar.xz ${spkgdir##*/}/ || error "Source package creation failed" echo; } @@ -828,7 +838,7 @@ fi mkdir -p ${distdir}/${PN}/${obssubdir}; - tar -Jcf ${distdir}/${PN}/${obssubdir}/${obspkg}-${PVR}.tar.xz --files-from /dev/null + tar ${TAR_OWNER} ${TAR_GROUP} -Jcf ${distdir}/${PN}/${obssubdir}/${obspkg}-${PVR}.tar.xz --files-from /dev/null __step "${pkg_name[${n}]} OBSOLETES: ${obspkg}" @@ -880,7 +890,7 @@ for obspkg in ${!dbg_obsoletes_var} do mkdir -p ${distdir}/${PN}/${obspkg}; - tar -Jcf ${distdir}/${PN}/${obspkg}/${obspkg}-${PVR}.tar.xz --files-from /dev/null + tar ${TAR_OWNER} ${TAR_GROUP} -Jcf ${distdir}/${PN}/${obspkg}/${obspkg}-${PVR}.tar.xz --files-from /dev/null __step "${PN}-debuginfo OBSOLETES: ${obspkg}" -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple