Re: [glibc] Own the %{_prefix}/lib/locale dir.
by Carlos O'Donell
Ville,
Adding glic fedora list and CC'ing Siddhesh.
Thank you very much for helping with glibc.
In the future please make sure we get a bug filed
for every issue so we can discuss the problem before
the fix is applied.
While glibc places files into %{_prefix}/lib/locale,
I would like to have talked about who should owns
those directories that are just expected to exist.
If the answer is "glibc" then I have no problem.
However, we don't own /etc for example, and as
the core C library we are the *first* package to
add a file into /etc from a bootstrap perspective.
Is there Fedora policy on which directories you
don't have to own and can expect?
Cheers,
Carlos.
On 01/25/2014 01:51 PM, Ville Skyttä wrote:
> commit 111d75b10fe5ed46bcfe24b1a78a620091b75ee5
> Author: Ville Skyttä <ville.skytta(a)iki.fi>
> Date: Sat Jan 25 20:52:16 2014 +0200
>
> Own the %{_prefix}/lib/locale dir.
>
> glibc.spec | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
> ---
> diff --git a/glibc.spec b/glibc.spec
> index d3a3a8d..6a36498 100644
> --- a/glibc.spec
> +++ b/glibc.spec
> @@ -1573,6 +1573,7 @@ rm -f *.filelist*
> %ifnarch %{auxarches}
> %files -f common.filelist common
> %defattr(-,root,root)
> +%dir %{_prefix}/lib/locale
> %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
> %attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
> %dir %attr(755,root,root) /etc/default
> @@ -1624,6 +1625,9 @@ rm -f *.filelist*
> %endif
>
> %changelog
> +* Sat Jan 25 2014 Ville Skyttä <ville.skytta(a)iki.fi>
> +- Own the %%{_prefix}/lib/locale dir.
> +
> * Thu Jan 23 2014 Siddhesh Poyarekar <siddhesh(a)redhat.com> - 2.18.90-23
> - Sync with upstream master.
>
>
10 years, 2 months
[RFC] Automate some of the upstream sync process
by Siddhesh Poyarekar
Hi Carlos,
I wrote up a script that automates some bits of the process of
importing tarballs from upstream master into rawhide. I've attached
the script for your review. Do you think this would be useful to have
in the fedora rawhide branch? With its presence, the workflow for
resyncing rawhide would simply be:
0. Check out the master branch on the local glibc repo
1. Check out the master branch on the fedora glibc repo
2. In fedora glibc, run:
./sync-upstream.sh <path-to-local-glibc-repo>
3.1. If the script succeeds:
fedpkg push
fedpkg build
3.2. If the script fails, analyze the reason for failure and fall back
to manual process. The most likely failure is that a patch
refuses to apply and one may have to adjust the patch before
committing the changes.
Let me know what you think about this.
Siddhesh
#!/bin/sh
# Given a git source repo, generate a tarball from master, modify the spec file
# and upload it to lookaside cache if the tarball unpacks and gets patched
# cleanly. This currently needs the source repo to be on the master branch.
# XXX In future, we could just do the git-archive ourselves instead of relying
# on the makefile bits. That way we don't have to waste time waiting for the
# bzip and xz archives that we don't use.
if [ $# -ne 1 ]; then
echo "Usage: $0 <path-to-upstream-repo>" 1>&2
exit 1
fi
upstream=$1
tmpdir=/tmp/tmp-rawhide-gzbuild
srcdir=$(git --git-dir=$upstream/.git describe)
cursrc=$(sed -ne 's/^%define glibcsrcdir \(.*\)/\1/p' glibc.spec)
if [ "$cursrc" = "$srcdir" ]; then
echo Already in sync with upstream
exit 0
fi
echo "+ Generating tarballs..."
mkdir $tmpdir
pushd $tmpdir
# We don't need any options here since we only want the makefile to be
# generated so that we can call make dist
$upstream/configure --prefix=/usr
# HACK! We don't want to regenerate the INSTALL file, so regenerate the file
# explicitly, undo its changes and then make dist. That way make thinks that
# INSTALL is up-to-date.
make INSTALL
pushd $upstream
git diff INSTALL | patch -p1 -R
popd
make dist
popd
rm -rf $tmpdir
if ! [ -f $upstream/$srcdir.tar.gz ]; then
echo "Failed to create the tarball"
exit 2
fi
# Copy over the tarball.
echo "+ Copying over generated tarball..."
cp $upstream/$srcdir.tar.gz ./
# Our changelog header
cldate=$(date +'%a %b %d %Y')
clname=$(git config --get user.name)
clemail=$(git config --get user.email | sed 's/@/\\@/')
# Getting our version and release number from the spec file.
nv=$(perl -ne 's/^%define glibcversion (.+)/printf("%s-", $1)/e;' \
-e 's/^%define glibcrelease ([0-9]+).*/printf("%d\n", $1 + 1)/e;' \
glibc.spec)
# Our changelog entry.
changelog="* $cldate $clname <$clemail> - $nv\n- Sync with upstream master.\n"
# Change the glibcsrcdir variable, bump up the release number and add an extra
# entry to the changelog.
echo "+ Updating spec file..."
perl -pi \
-e "s/^(%define glibcsrcdir ).+/\$1$srcdir/;
s/^(%define glibcrelease )(\d+)/print(\$1); print(\$2 + 1);'';/e;
s/^(%changelog)$/\$1\n$changelog/" \
glibc.spec
echo "Testing if fedpkg prep works..."
if fedpkg prep; then
echo "Source prep is clean, so we're good to go."
fedpkg new-sources $srcdir.tar.gz
git commit -a -m \"Sync with upstream master\"
# XXX I don't have the courage yet to do a fedpkg push && fedpkg build
# from the script.
else
echo "Source prep failed."
echo "Check the output above and fix things before committing."
fi
echo "+ Done!"
10 years, 2 months