* cygport: Request a new feature in order to set owner/group names in packaged tarballs.
@ 2020-08-03 11:55 Lemures Lemniscati
2020-08-03 19:24 ` Achim Gratz
0 siblings, 1 reply; 2+ messages in thread
From: Lemures Lemniscati @ 2020-08-03 11:55 UTC (permalink / raw)
To: 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 <http://www.gnu.org/licenses/>.
#
################################################################################
+# 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}"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
2020-08-03 11:55 cygport: Request a new feature in order to set owner/group names in packaged tarballs Lemures Lemniscati
@ 2020-08-03 19:24 ` Achim Gratz
0 siblings, 0 replies; 2+ messages in thread
From: Achim Gratz @ 2020-08-03 19:24 UTC (permalink / raw)
To: cygwin
Lemures Lemniscati via Cygwin writes:
> This is another patch, so that cygport shall make tarballs with
> specified owner and group names.
Cygport patches should better go to cygwin-apps. I've already sent a
patch that allows you to do the same thing some time ago, but it has
not been reviewed yet.
https://repo.or.cz/cygport/rpm-style.git/commitdiff/c6af2ca23aae5da3e99c70cf2b704430b929f431
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-03 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 11:55 cygport: Request a new feature in order to set owner/group names in packaged tarballs Lemures Lemniscati
2020-08-03 19:24 ` Achim Gratz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).