umegaya-0.13/ 0000755 0000000 0000000 00000000000 12132230762 007751 5 ustar umegaya-0.13/index.mdwn 0000644 0000000 0000000 00000001721 12132202421 011737 0 ustar Umegaya — MEtadata GAtherer using YAml
======================================
Umegaya is a gatherer of meta information about the software packaged in
Debian. This metadata is accumlated by the package maintainer in the version
control system containing the Debian souce package, in a file called
debian/upstream
, and it is collected by the Umegaya web service
each time it is accessed. The Umegaya web service then aggregates information
about all the packages it knows, and outputs as tables or YAML records that can
be loaded in central information hubs like the Ultimate Debian Database.
Optionally, Umegaya will keep a local copy if the files it retrieves from the
VCS. See also [[!debwiki UpstreamMetadata]] on the Debian wiki.
Umegaya is distributed under the BOLA [[LICENSE]].
See the [[setup]] and [[man]] pages for more documentation, the [[todo]] list,
and of course the [source code](http://source.umegaya.branchable.com/?p=source.git;a=tree).
umegaya-0.13/setup.mdwn 0000644 0000000 0000000 00000006700 12132230406 011776 0 ustar Setting up Umegaya
==================
Programs needed
---------------
- Apache
- Berkeley DB
- The following Perl modules:
- LWP
- YAML
- YAML::Appconfig
YAML::Appconfig is ageing and generates deprecation warnings with recent
versions of Perl, but this has been corrected in Debian's 0.16-2 package.
Configuration
-------------
- Set up an Apache virtual host using the `apache.conf` file in
`/etc/umegaya/`.
- Set up a directory where apache can write the `umegaya.db` Berkeley DB. By
default it is `/var/lib/umegaya`.
- Make sure that the Umegaya administrator has also write access to the
directory.
- Umegaya finds the package's VCS using the `debcheckout` command of the
devscripts package, so a `deb-src` line tracking Sid is necessary for a full
coverage.
Triggering
----------
Umegaya is a passive system, that refreshes itself only when accessed. It
can be kept up to date by systems that will access it when some resources
are refreshed, for intance commit hooks.
To refresh Umegaya for each package that has been uploaded to Debian,
subscribe to the [debian-devel-changes][] mailing list and pipe its messages to
umegaya-ddc-ping(1).
[debian-devel-changes]: http://lists.debian.org/debian-devel-changes
Another way is to periodically access a list of selected packages. For
instance, the script `umegaya-refresh-blends(1)` refreshes Umegaya for all
packages in Debian Pure Blends. It is called by a daily cron job and can be
must be activated through the refresh_blends parameter in `/etc/umegaya/umegaya.conf`.
`umegaya-refresh-blends(1)` tries to guess the VCS URL packages that are not know
of debcheckout, using the layout policy of the blends.
The list of packages recommended by each blend overlap. To avoid unnecessary
requests, the default refresh delay is set to one hour. Alioth is never
queried when the last refresh was made within the refresh delay.
This (and below) assumes that the VCS name is the source package names.
This is true in theory, but in practice, a safeguard for errors may be
necessary.
To determine if a package managed with Git on Alioth contains a debian/upstream file.
for repo in /git/debian-med/*.git
do
(cd $repo ; git ls-tree master debian/ |
grep 'debian/upstream$' > /dev/null && echo "$repo")
done | sed -e 's|/git/debian-med/||' -e 's|.git$||'
Accumulating the files on the local disk
----------------------------------------
Via the _store_files_ and _debian_control_ and _debian_copyright_ options,
umegaya can keep a local copy of the upstream, control and copyright files of
the packages, in the _db_dir_ directory.
The Debian package provides a pooled directory structure in `/var/lib/umegaya`,
but it needs to be created if another path is chosen.
Pushing these files to a remote Subversion server
-------------------------------------------------
Create a passwordless key, and restrict it to run only svnserve, as [explained
in the red bean book][svn-ssh-tricks]. Check out the repository in umegaya's
_db_dir_ (--force). Commit from time to time.
[svn-ssh-tricks]: http://svnbook.red-bean.com/en/1.7/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshtricks
Notes about YAML
----------------
# Invalid
foo: bar:
# Valid
foo: "bar:"
# Also valid
foo: >
bar:
Also valid
foo: |
bar:
The difference between | and > is roughly the same as between the multi-line
and folded fields in Debian control files.
umegaya-0.13/debian/ 0000755 0000000 0000000 00000000000 12132231503 011165 5 ustar umegaya-0.13/debian/compat 0000644 0000000 0000000 00000000002 12074224361 012374 0 ustar 9
umegaya-0.13/debian/links 0000644 0000000 0000000 00000000163 12074224361 012241 0 ustar /etc/umegaya/robots.txt /usr/share/umegaya/htdocs/robots.txt
/etc/umegaya/apache.conf /etc/apache2/conf.d/umegaya
umegaya-0.13/debian/gbp.conf 0000644 0000000 0000000 00000000303 12074224361 012611 0 ustar # This source package is managed with git-buildpackage, but not pristine-tar.
[DEFAULT]
pristine-tar = False
[git-dch]
# Include 7 digits of the commit ID in the changelog entry.
id-length = 7
umegaya-0.13/debian/umegaya.lintian-overrides 0000644 0000000 0000000 00000000120 12074224361 016177 0 ustar # Umegaya is a recursive acronym.
umegaya: description-starts-with-package-name
umegaya-0.13/debian/dirs 0000644 0000000 0000000 00000002440 12074224361 012062 0 ustar var/lib/umegaya
var/lib/umegaya/packages-metadata/a
var/lib/umegaya/packages-metadata/b
var/lib/umegaya/packages-metadata/c
var/lib/umegaya/packages-metadata/d
var/lib/umegaya/packages-metadata/e
var/lib/umegaya/packages-metadata/f
var/lib/umegaya/packages-metadata/g
var/lib/umegaya/packages-metadata/h
var/lib/umegaya/packages-metadata/i
var/lib/umegaya/packages-metadata/j
var/lib/umegaya/packages-metadata/k
var/lib/umegaya/packages-metadata/l
var/lib/umegaya/packages-metadata/m
var/lib/umegaya/packages-metadata/n
var/lib/umegaya/packages-metadata/o
var/lib/umegaya/packages-metadata/p
var/lib/umegaya/packages-metadata/q
var/lib/umegaya/packages-metadata/r
var/lib/umegaya/packages-metadata/s
var/lib/umegaya/packages-metadata/t
var/lib/umegaya/packages-metadata/u
var/lib/umegaya/packages-metadata/v
var/lib/umegaya/packages-metadata/w
var/lib/umegaya/packages-metadata/x
var/lib/umegaya/packages-metadata/y
var/lib/umegaya/packages-metadata/z
var/lib/umegaya/packages-metadata/0
var/lib/umegaya/packages-metadata/1
var/lib/umegaya/packages-metadata/2
var/lib/umegaya/packages-metadata/3
var/lib/umegaya/packages-metadata/4
var/lib/umegaya/packages-metadata/5
var/lib/umegaya/packages-metadata/6
var/lib/umegaya/packages-metadata/7
var/lib/umegaya/packages-metadata/8
var/lib/umegaya/packages-metadata/9
umegaya-0.13/debian/copyright 0000644 0000000 0000000 00000002161 12132223461 013124 0 ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://source.umegaya.branchable.com/?p=source.git;a=tags
Files: *
Copyright: none claimed
License: BOLA-1.1
BOLA - Buena Onda License Agreement (v1.1)
------------------------------------------
.
This work is provided 'as-is', without any express or implied warranty. In no
event will the authors be held liable for any damages arising from the use of
this work.
.
To all effects and purposes, this work is to be considered Public Domain.
.
.
However, if you want to be "buena onda", you should:
.
1. Not take credit for it, and give proper recognition to the authors.
2. Share your modifications, so everybody benefits from them.
3. Do something nice for the authors.
4. Help someone who needs it: sign up for some volunteer work or help your
neighbour paint the house.
5. Don't waste. Anything, but specially energy that comes from natural
non-renewable resources. Extra points if you discover or invent something
to replace them.
6. Be tolerant. Everything that's good in nature comes from cooperation.
umegaya-0.13/debian/changelog 0000644 0000000 0000000 00000006360 12132231432 013045 0 ustar umegaya (0.13) unstable; urgency=low
06dbcdc Hosting the source code on Branchable.
2c14a12 Normalised debian/control with 'cme fix dpkg-control'.
5586d64 Conforms to Policy 3.9.4.
bf975bf Distribute the index, setup and todo files as documentation.
d482ec0 umegaya-fields-stats: ranked list of fields from copyright files
-- Charles Plessy Sat, 13 Apr 2013 19:27:36 +0900
umegaya (0.12) unstable; urgency=low
2293ecd umegaya-query: a tool to avoid typing the long default URL.
4db19af umegaya-license-stats: rank licenses by frequency in copyright files.
bfc7689 Serve umegaya-license-stats output at /umegaya/license-stats.
-- Charles Plessy Sat, 12 Jan 2013 17:56:06 +0900
umegaya (0.11) unstable; urgency=low
0268e44 Assume 'foo' as the package name for 'foo/trunk' Svn URLs.
7361239 Guess path to debian/upstream in GitHub.
4d88db9 umegaya-self-clean: exit if umegaya-adm is not installed.
Closes: #689250
-- Charles Plessy Thu, 04 Oct 2012 07:12:40 +0900
umegaya (0.10) unstable; urgency=low
* Initial upload to Debian, closes: #657825.
c0c90f5 umegaya-ddc-ping: Removed -x flag, forgotten in by accident.
af2f6c7 umegaya-ddc-ping: `message` option to use syslog instead of exiting
on failure.
860eb57 umegaya-self-clean: a script that tidies the Umegaya database.
d4b581f Build-depend on perl-doc.
-- Charles Plessy Sat, 08 Sep 2012 14:35:01 +0900
umegaya (0.9) unreleased; urgency=low
* Deployed on debian-med.debian.net.
[ Charles Plessy ]
f8de3b3 Update daily push script to also push control files.
1b83a6b Allow the insertion of a local comment.
[ Andreas Tille ]
e06dafc Make sure a failed ping of a package will not let the script exit.
-- Charles Plessy Mon, 25 Jun 2012 09:30:16 +0900
umegaya (0.8) unreleased; urgency=low
* Download Debian source package control files (optional).
* Deployed on debian-med.debian.net.
-- Charles Plessy Wed, 23 May 2012 09:06:57 +0900
umegaya (0.7) unreleased; urgency=low
* Deployed locally for upload-driven refreshes.
-- Charles Plessy Sun, 22 Apr 2012 12:48:05 +0900
umegaya (0.6) unreleased; urgency=low
* Daily cron job to refresh packages recommended or suggested by Blends.
* Deployed on debian-med.debian.net.
-- Charles Plessy Sun, 08 Apr 2012 23:00:54 +0900
umegaya (0.5) unreleased; urgency=low
* Packages can have plusses in their names.
* Deployed on debian-med.debian.net.
-- Charles Plessy Mon, 02 Apr 2012 23:53:58 +0900
umegaya (0.4) unreleased; urgency=low
* Deployed on debian-med.debian.net.
-- Charles Plessy Sun, 04 Mar 2012 17:23:43 +0900
umegaya (0.3) unreleased; urgency=low
* Test release on a private machine.
-- Charles Plessy Thu, 01 Mar 2012 23:41:32 +0900
umegaya (0.2) unreleased; urgency=low
* Deployed on debian-med.debian.net.
-- Charles Plessy Thu, 01 Mar 2012 23:28:39 +0900
umegaya (0.1) unreleased; urgency=low
* Proof of principle that works on localhost.
-- Charles Plessy Sun, 19 Feb 2012 00:01:37 +0900
umegaya-0.13/debian/postinst 0000644 0000000 0000000 00000002314 12074224361 013004 0 ustar #!/bin/sh
# postinst script for umegaya
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * `configure'
# * `abort-upgrade'
# * `abort-remove' `in-favour'
#
# * `abort-remove'
# * `abort-deconfigure' `in-favour'
# `removing'
#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
if [ -x /etc/init.d/apache2 ]
then
if which /usr/sbin/invoke-rc.d >/dev/null 2>&1
then
invoke-rc.d apache2 reload || true
else
/etc/init.d/apache2 reload || true
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
umegaya-0.13/debian/source/ 0000755 0000000 0000000 00000000000 12074224361 012476 5 ustar umegaya-0.13/debian/source/format 0000644 0000000 0000000 00000000015 12074224361 013705 0 ustar 3.0 (native)
umegaya-0.13/debian/rules 0000755 0000000 0000000 00000001027 12074224361 012256 0 ustar #!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@
override_dh_auto_build:
perldoc -o nroff cgi-bin/umegaya > man/umegaya.1
perldoc -o nroff scripts/umegaya-adm > man/umegaya-adm.1
for file in man/*.1.mdwn ; do \
pandoc -s -w man $$file -o man/$$(basename $$file .mdwn) ; done
override_dh_clean:
$(RM) man/umegaya*.1
dh_clean
override_dh_fixperms:
dh_fixperms
chmod -R 2775 $(CURDIR)/debian/umegaya/var/lib/umegaya
chown -R www-data:www-data $(CURDIR)/debian/umegaya/var/lib/umegaya
umegaya-0.13/debian/docs 0000644 0000000 0000000 00000000076 12132223554 012052 0 ustar scripts/example-push-metadata
index.mdwn
setup.mdwn
todo.mdwn
umegaya-0.13/debian/manpages 0000644 0000000 0000000 00000000007 12074224361 012711 0 ustar man/*1
umegaya-0.13/debian/install 0000644 0000000 0000000 00000000616 12132231470 012564 0 ustar cgi-bin/umegaya usr/lib/cgi-bin
conf/apache.conf etc/umegaya
conf/robots.txt etc/umegaya
conf/umegaya.conf etc/umegaya
scripts/umegaya-adm usr/bin
scripts/umegaya-guess-url usr/bin
scripts/umegaya-ddc-ping usr/bin
scripts/umegaya-fields-stats etc/cron.daily
scripts/umegaya-license-stats etc/cron.daily
scripts/umegaya-refresh-blends etc/cron.daily
scripts/umegaya-self-clean etc/cron.daily
umegaya-0.13/debian/control 0000644 0000000 0000000 00000001741 12132223250 012573 0 ustar Source: umegaya
Maintainer: Charles Plessy
Section: database
Priority: optional
Build-Depends: debhelper (>= 9),
pandoc,
perl,
perl-doc
Standards-Version: 3.9.4
Vcs-Browser: http://source.umegaya.branchable.com/?p=source.git;a=tree
Vcs-Git: git://umegaya.branchable.com/
Homepage: http://umegaya.branchable.com
Package: umegaya
Architecture: all
Depends: devscripts,
libberkeleydb-perl,
libyaml-libyaml-perl,
libyaml-appconfig-perl,
libwww-perl,
subversion,
${perl:Depends},
${misc:Depends}
Recommends: curl
Description: Umegaya is a MEtadata GAtherer using YAml
Aggregator of meta information about the software packages. The central
concept is that the metadata is accumlated by the package maintainer in a
version control system containing the source package, in a file called
debian/upstream, and collected by the web aggregator each time it is accessed.
umegaya-0.13/debian/upstream 0000644 0000000 0000000 00000000162 12132201514 012746 0 ustar Archive: Alioth
Contact: Charles Plessy
Name: Umegaya
Homepage: http://umegaya.branchable.com
umegaya-0.13/scripts/ 0000755 0000000 0000000 00000000000 12132230177 011440 5 ustar umegaya-0.13/scripts/umegaya-refresh-blends 0000755 0000000 0000000 00000004652 12074224361 015731 0 ustar #!/bin/sh
set -e
# Exit if refresh_blends is null in umegaya.conf.
[ $(grep ^refresh_blends /etc/umegaya/umegaya.conf |
sed -r 's/refresh_blends:\s+//') = 0 ] && exit 0
# Exit if curl, debcheckout, umegaya-adm, umegaya-guess-url or svn are not installed.
# Exit code is zero as this script is intended as a cron job.
[ -x /usr/bin/curl ] || exit 0
[ -x /usr/bin/debcheckout ] || exit 0
[ -x /usr/bin/umegaya-adm ] || exit 0
[ -x /usr/bin/umegaya-guess-url ] || exit 0
[ -x /usr/bin/svn ] || exit 0
# Start with debichem med and science, but later let's fetch all the
# names from $(svn ls svn://svn.debian.org/blends/projects/)
BLENDS='debichem debian-med debian-science'
#set -x
for BLEND in $BLENDS
do
BLEND_URL=$(debcheckout -d $BLEND | grep url | cut -f2)
# Learn VCS URL for packages not yet in Debian.
for TASK in $(svn ls $BLEND_URL/tasks)
do
for VCS_URL in $(svn cat $BLEND_URL/tasks/$TASK | grep 'Vcs-[SG]' | cut -f2 -d' ')
do
PACKAGE=$(umegaya-guess-url $VCS_URL | cut -f1)
[ $PACKAGE ] &&
umegaya-adm -p $PACKAGE -k YAML-URL -v $VCS_URL
done
done
# Refresh Umegaya for each package.
PACKAGES=$(
svn cat $BLEND_URL/debian/control |
grep -e ^Recommends -e ^Suggests |
sed -e 's/,//g' -e 's/|//g' -e 's/Recommends://g' -e 's/Suggests://g' )
for PACKAGE in $PACKAGES
do
SOURCE=$(apt-cache showsrc $PACKAGE 2> /dev/null | grep Package -m1 | awk '{print $2}')
if [ "$SOURCE" != "" ] ; then
# make sure a failed ping will not interupt script
curl --silent "http://localhost/umegaya/$SOURCE/ping" || true
if [ $? != 0 ] ; then
echo "$0: Problem pinging $SOURCE ($?)"
fi
fi
done
done
# create downloadable archive of the fetched files
STOREFILES=`grep ^store_files /etc/umegaya/umegaya.conf | sed -r 's/store_files:\s+//'`
TARGETARCHIVE=`grep ^archive_for_bibref_gatherer /etc/umegaya/umegaya.conf | sed -r 's/archive_for_bibref_gatherer:\s+//'`
if [ $TARGETARCHIVE != "" -a $STOREFILES != "" ] ; then
STOREDIR=`dirname $STOREFILES`
if [ -d $STOREDIR ] ; then
cd $STOREDIR
BASESTOREDIR=`basename $STOREFILES`
if [ -d $BASESTOREDIR ] ; then
tmpignorezerolengthfiles=`mktemp`
find packages-metadata -size 0 >> $tmpignorezerolengthfiles
tar --exclude-vcs --exclude-from $tmpignorezerolengthfiles -cjf $TARGETARCHIVE $BASESTOREDIR
rm -f $tmpignorezerolengthfiles
fi
fi
fi
umegaya-0.13/scripts/umegaya-ddc-ping 0000755 0000000 0000000 00000001374 12074224361 014511 0 ustar #!/bin/sh -e
# Umegaya's debian-devel-changes pinger
#
# Piped emails from http://lists.debian.org/debian-devel-changes to this program
# trigger a ping for the corresponding package in an Umegaya instance.
URL=$(awk '/^ping_url:/ {print $2 ; nextfile}' /etc/umegaya/umegaya.conf)
PACKAGE=$(grep ^Subject -m1 | awk '{print $3}')
MESSAGES=$(awk '/^messages:/ {print $2 ; nextfile}' /etc/umegaya/umegaya.conf)
if [ "$PACKAGE" != '' ] ; then
curl --silent ${URL-http://localhost/umegaya}/$PACKAGE/ping > /dev/null
if [ "$MESSAGES" = 'syslog' ] ; then
logger -i umegaya-ddc-ping: pinged $PACKAGE at $URL
fi
exit 0
fi
if [ "$MESSAGES" = 'syslog' ] ; then
logger -i umegaya-ddc-ping: failed to find package name in standard input
else
exit 1
fi
exit 0
umegaya-0.13/scripts/umegaya-reshape 0000755 0000000 0000000 00000000472 12074224361 014451 0 ustar #!/usr/bin/r
write.table( file = "" ,
sep = "\t" ,
quote = FALSE ,
row.names = FALSE ,
reshape( data.frame(scan( "",
quiet = TRUE,
sep = "\t",
what = list(pack="", key="",val="")
)),
direction = "wide",
idvar = "pack",
timevar = "key"
)
)
umegaya-0.13/scripts/umegaya-adm 0000755 0000000 0000000 00000012205 12074224361 013560 0 ustar #!/usr/bin/perl
=head1 NAME
umegaya-adm - A tool to administrate the Umegaya database.
=head1 SYNOPSIS
B B<-p> package B<-k> key B<-v> value [B<--delete] [B<--verbose>]
B B<-h>, B<--help>
=head1 DESCRIPTION
C interrogates or modifies the Berkeley database in which
the gathered metadata is stored. If a combination of package, key and
value is given, it will set the value. Otherwise it will give
appropriate information using the of package or key provided as
argument.
For example:
$ umegaya-adm -p package -k key -v value
$ umegaya-adm -p package -k key
value
$ umegaya-adm -p package -k key2 -v value2
$ umegaya-adm -p package -k key2
value2
$ umegaya-adm -p package
key value
key2 value2
$ umegaya-adm -p package2 -k key -v value3
$ umegaya-adm -k key
package value
package2 value3
$ umegaya-adm -p package2 -k key --delete
$ umegaya-adm -k key
package value
=cut
use strict;
use warnings;
use 5.10.0;
use BerkeleyDB;
use Getopt::Long;
use YAML::AppConfig;
my $conf = YAML::AppConfig->new(file => "/etc/umegaya/umegaya.conf");
my $lib = $conf->get("db_dir");
my $berkeleydb = $lib . $conf->get("db_name");
my %stored;
umask 002;
tie (%stored, 'BerkeleyDB::Hash', -Filename => $berkeleydb, -Flags => DB_CREATE)
or die "Cannot open file $berkeleydb: $! $BerkeleyDB::Error\n" ;
=head1 OPTIONS
=over 8
=item B<-d>, B<--delete>
In combination with B<--key> or B<--package>, delete the value(s) instead of
displaying them.
=item B<-k>, B<--key>
If set alone, C will display all the package-values pairs for the
given key. If set together with B<--package>, C will display the
corresponding value.
=item B<-p>, B<--package>
If set alone, C will display all the key-values pairs for the given
package. If set together with B<--key>, C will display the
corresponding value.
=item B<--purge>
Deletes the umegaya database without asking for confirmation.
=item B<-v>, B<--value>
When this option is set together with B<--key> and B<--package>, C
sets the given value for the given key of the given package.
=item B<--verbose>
Returns the set value to the standard output when used in conjunction with
B<--key>, B<--package>, and B<--value>.
=back
=cut
my ($delete, $package, $purge, $help, $key, $value, $verbose);
GetOptions ( 'delete' => \$delete ,
'package|p=s' => \$package ,
'purge' => \$purge ,
'help' => \$help ,
'key=s' => \$key ,
'value|v=s' => \$value ,
'verbose' => \$verbose );
if ($help) {
print qx(perldoc $0);
exit;
}
if ($purge) {
die "$0: --purge can not be combined with other arguments.\n" if ($delete or $package or $key or $value);
untie %stored;
unlink $berkeleydb or die "$0: could not remove $berkeleydb: $!\n";
exit;
}
if ($value) {
die "$0: --value option needs --package and --key to be set\n" unless ($package and $key);
$stored{join(':', $package, $key)} = $value;
say $stored{join(':', $package, $key)} if $verbose;
} elsif ($key) {
if ($package) {
$delete ? delete $stored{join(':', $package, $key)} : say $stored{join(':', $package, $key)};
exit
}
foreach (keys (%stored)) {
next unless /:$key$/;
my $package = (split (':'))[0];
$delete ? delete $stored{$_} : say $package, "\t", $stored{$_};
}
} elsif ($package) {
foreach (keys (%stored)) {
next unless /^$package:/;
my $key = (split (':'))[1];
$delete ? delete $stored{$_} : say $key, "\t", $stored{$_};
}
} else {
die "Use ‘rm $berkeleydb’ to delete the whole file\n" if $delete;
say "Type umegaya-adm --help to read the documentation";
}
=head1 ADVANCED USAGE
use C to set special keys for the packages.
=head1 SEE ALSO
umegaya(7), upstream-metadata.debian.net(7)
=head1 AUTHOR
Charles Plessy
=head1 LICENCE
BOLA - Buena Onda License Agreement (v1.1)
------------------------------------------
This work is provided 'as-is', without any express or implied warranty. In no
event will the authors be held liable for any damages arising from the use of
this work.
To all effects and purposes, this work is to be considered Public Domain.
However, if you want to be "buena onda", you should:
1. Not take credit for it, and give proper recognition to the authors.
2. Share your modifications, so everybody benefits from them.
3. Do something nice for the authors.
4. Help someone who needs it: sign up for some volunteer work or help your
neighbour paint the house.
5. Don't waste. Anything, but specially energy that comes from natural
non-renewable resources. Extra points if you discover or invent something
to replace them.
6. Be tolerant. Everything that's good in nature comes from cooperation.
=head1 SOURCE
http://anonscm.debian.org/gitweb/?p=users/plessy/umegaya.git;a=blob;f=scripts/umegaya-adm
=cut
umegaya-0.13/scripts/umegaya-fields-stats 0000755 0000000 0000000 00000001474 12132230177 015424 0 ustar #!/bin/sh
set -e
# Exit if umegaya-adm is not installed.
# Exit code is zero as this script is intended as a cron job.
[ -x /usr/bin/umegaya-adm ] || exit 0
TMPFILE=$(mktemp -t umegaya-fields-stats.XXXXXXXXXX)
for file in $(grep -rl '^Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/$' /var/lib/umegaya/packages-metadata/*/*.copyright )
do
grep --only-matching --perl-regexp '^[^\s:]*' $file |
sort --ignore-case --unique
done |
sort --ignore-case |
uniq --ignore-case --count |
sort --reverse --numeric-sort > $TMPFILE
TMPFILE_USER=$(stat --format %u /var/lib/umegaya/)
TMPFILE_GROUP=$(stat --format %g /var/lib/umegaya/)
if [ $(whoami) = "root" ]
then
chown $TMPFILE_USER:$TMPFILE_GROUP $TMPFILE
chmod 664 $TMPFILE
fi
cp $TMPFILE /var/lib/umegaya/fields-stats
rm $TMPFILE
umegaya-0.13/scripts/example-push-metadata 0000644 0000000 0000000 00000002665 12132206122 015553 0 ustar #!/bin/sh -e
#
# This is the script used on blends.debian.net to push the collected files to
# the packages-metadata directory of the Subversion repositry 'collab-qa'.
#
# The repostitory has been checked out with the following command.
#
# SVN_SSH="ssh -i $HOME/.ssh/alioth-svn-commit_rsa" svn checkout --force svn+ssh://svn.debian.org/svn/collab-qa/packages-metadata/
#
# It is ugly and has many shortcomings. All the find commands should
# disappear.
#
# The SSH key is of course restricted to only run svnserve.
POOL=/var/lib/umegaya/packages-metadata/
STAMP= ${TMPDIR-/tmp}/umegaya-timestamp
rm -f $STAMP
touch $STAMP
find $POOL -empty | grep -v 'svn/' | xargs -L1 rm -f
find $POOL -name '*control' | xargs grep -l DOCT | xargs rm -f
find $POOL -name '*copyright' | xargs grep -l DOCT | xargs rm -f
find $POOL -name '*upstream' | xargs grep -l DOCT | xargs rm -f
find $POOL -name '*upstream' | xargs grep -l '^