mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 23:12:55 +00:00
buildsystem: add autoconf/automake support
Test by 'make distcheck'.
This commit is contained in:
parent
91ab0a3be9
commit
4e5211d33e
20 changed files with 380 additions and 53 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1 +1,9 @@
|
||||||
|
build_aux/
|
||||||
|
install-selinux-module
|
||||||
|
configure
|
||||||
|
config.*
|
||||||
|
Makefile
|
||||||
|
*.pp.*
|
||||||
|
*.in
|
||||||
*.swp
|
*.swp
|
||||||
|
m4
|
||||||
|
|
22
Makefile.am
Normal file
22
Makefile.am
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
CLEANFILES =
|
||||||
|
EXTRA_DIST = \
|
||||||
|
COPYING \
|
||||||
|
LICENSE \
|
||||||
|
README.md \
|
||||||
|
$(ac_aux_dir)/build-selinux-module \
|
||||||
|
$(ac_aux_dir)/install-selinux-module.in
|
||||||
|
|
||||||
|
# Define some variables here so included makefiles can just '+='
|
||||||
|
pkgdata_SCRIPTS =
|
||||||
|
dist_libexec_SCRIPTS =
|
||||||
|
|
||||||
|
nodist_noinst_SCRIPTS = install-selinux-module
|
||||||
|
install-selinux-module: $(ac_aux_dir)/install-selinux-module.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
DISTCLEANFILES = install-selinux-module
|
||||||
|
|
||||||
|
include scripts/dist-git/Makefile.inc
|
||||||
|
include scripts/httpd/Makefile.inc
|
||||||
|
include configs/Makefile.inc
|
||||||
|
include selinux/Makefile.inc
|
3
bootstrap
Executable file
3
bootstrap
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
autoreconf -vfi
|
9
build_aux/build-selinux-module
Executable file
9
build_aux/build-selinux-module
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
module=$1
|
||||||
|
target=$2
|
||||||
|
where=$3
|
||||||
|
variant=`echo "$target" | sed 's|.*\.||'`
|
||||||
|
make -j1 -C "$where" NAME="$variant" -f /usr/share/selinux/devel/Makefile \
|
||||||
|
&& mv "$where/$module.pp" "$target" \
|
||||||
|
&& make -j1 -C "$where" NAME="$variant" -f /usr/share/selinux/devel/Makefile
|
40
build_aux/install-selinux-module.in
Normal file
40
build_aux/install-selinux-module.in
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
install=:
|
||||||
|
DESTDIR=
|
||||||
|
selinux_dir=@selinuxmoduledir@
|
||||||
|
|
||||||
|
while test "$#" -gt 0
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
--uninstall)
|
||||||
|
install=false
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--destdir)
|
||||||
|
DESTDIR=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ignored arg $arg"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
for module
|
||||||
|
do
|
||||||
|
variant=`echo "$module" | sed 's|.*\.||'`
|
||||||
|
rawmod=`echo "$module" | sed 's|\.[^\.]*$||'`
|
||||||
|
dir="$DESTDIR$selinux_dir/$variant"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
if $install ; then
|
||||||
|
install -m 644 "$module" "$dir/$rawmod"
|
||||||
|
else
|
||||||
|
rm "$dir/$rawmod"
|
||||||
|
fi
|
||||||
|
done
|
11
configs/Makefile.inc
Normal file
11
configs/Makefile.inc
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
dist_distgit_conf_DATA = %D%/dist-git/dist-git.conf
|
||||||
|
|
||||||
|
dist_apache_conf_DATA = %D%/httpd/dist-git.conf
|
||||||
|
|
||||||
|
dist_apache_conf_distgit_DATA = \
|
||||||
|
%D%/httpd/dist-git/git-smart-http.conf \
|
||||||
|
%D%/httpd/dist-git/lookaside.conf
|
||||||
|
|
||||||
|
dist_systemd_units_DATA = \
|
||||||
|
%D%/systemd/dist-git@.service \
|
||||||
|
%D%/systemd/dist-git.socket
|
39
configure.ac
Normal file
39
configure.ac
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
AC_INIT([dist-git], [0.13], [msuchy@redhat.com])
|
||||||
|
AC_CONFIG_AUX_DIR([build_aux])
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||||
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
|
_AX_TEXT_TPL_INIT
|
||||||
|
_AX_TEXT_TPL_SUBST([ac_aux_dir])
|
||||||
|
_AX_TEXT_TPL_SUBST([distgit_confdir], [${sysconfdir}/dist-git])
|
||||||
|
_AX_TEXT_TPL_SUBST([apache_confdir], [${sysconfdir}/httpd/conf.d])
|
||||||
|
_AX_TEXT_TPL_SUBST([apache_conf_distgitdir], [${apache_confdir}/dist-git])
|
||||||
|
# TODO! CGI script should be somewhere else, this directory is overmounted!
|
||||||
|
_AX_TEXT_TPL_SUBST([webdir], [${localstatedir}/lib/dist-git/web])
|
||||||
|
_AX_TEXT_TPL_SUBST([systemd_unitsdir], [${prefix}/lib/systemd/system])
|
||||||
|
_AX_TEXT_TPL_SUBST([selinuxmoduledir], [${datadir}/selinux])
|
||||||
|
|
||||||
|
_AX_TEXT_TPL_SUBST([selinux_module], [dist_git])
|
||||||
|
SELINUX_VARIANTS=
|
||||||
|
AC_ARG_WITH([selinux-variants],
|
||||||
|
AS_HELP_STRING([--with-selinux-variants],
|
||||||
|
[Space separated list of SELinux variants to be built]),
|
||||||
|
[SELINUX_VARIANTS=$withval])
|
||||||
|
|
||||||
|
sp=
|
||||||
|
for variant in $SELINUX_VARIANTS
|
||||||
|
do
|
||||||
|
new_variants="$new_variants$sp$selinux_module.pp.$variant"
|
||||||
|
sp=' '
|
||||||
|
done
|
||||||
|
SELINUX_VARIANTS=$new_variants
|
||||||
|
|
||||||
|
_AX_TEXT_TPL_SUBST([SELINUX_VARIANTS])
|
||||||
|
|
||||||
|
SHELL_PARSE_CONFIG="eval \$\$(crudini --format=sh --get ${distgit_confdir}/dist-git.conf)"
|
||||||
|
_AX_TEXT_TPL_SUBST([SHELL_PARSE_CONFIG])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_OUTPUT
|
|
@ -15,7 +15,7 @@ License: MIT and GPLv1
|
||||||
URL: https://github.com/release-engineering/dist-git
|
URL: https://github.com/release-engineering/dist-git
|
||||||
# Source is created by
|
# Source is created by
|
||||||
# git clone https://github.com/release-engineering/dist-git.git
|
# git clone https://github.com/release-engineering/dist-git.git
|
||||||
# cd dist-git
|
# cd dist-git && ./bootstrap && ./configure && make dist
|
||||||
# tito build --tgz
|
# tito build --tgz
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
@ -65,17 +65,10 @@ This package includes SELinux support.
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# ------------------------------------------------------------------------------
|
%configure \
|
||||||
# SELinux
|
--with-selinux-variants="%selinux_variants"
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
cd selinux
|
make %_smp_mflags
|
||||||
for selinuxvariant in %{selinux_variants}
|
|
||||||
do
|
|
||||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
|
||||||
mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
|
|
||||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
|
||||||
done
|
|
||||||
cd -
|
|
||||||
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
@ -87,48 +80,18 @@ getent group packager > /dev/null || \
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# ------------------------------------------------------------------------------
|
make install DESTDIR=%{buildroot}
|
||||||
# /usr/local/bin ........... scripts
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
install -d %{buildroot}%{_datadir}/dist-git/
|
|
||||||
cp -a scripts/dist-git/* %{buildroot}%{_datadir}/dist-git/
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# /etc/ .......... config files
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/dist-git
|
|
||||||
cp -a configs/dist-git/dist-git.conf %{buildroot}%{_sysconfdir}/dist-git/
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d/dist-git
|
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
|
||||||
|
|
||||||
cp -a configs/httpd/dist-git.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
|
||||||
cp -a configs/httpd/dist-git/* %{buildroot}%{_sysconfdir}/httpd/conf.d/dist-git/
|
|
||||||
cp -a configs/systemd/* %{buildroot}%{_unitdir}/
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# /var/lib/ ...... dynamic persistent files
|
# /var/lib/ ...... dynamic persistent files
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
# TODO: Create those on the fly at runtime?
|
||||||
install -d %{buildroot}%{installdir}
|
install -d %{buildroot}%{installdir}
|
||||||
install -d %{buildroot}%{installdir}/git
|
install -d %{buildroot}%{installdir}/git
|
||||||
install -d %{buildroot}%{installdir}/git/repositories
|
install -d %{buildroot}%{installdir}/git/repositories
|
||||||
install -d %{buildroot}%{installdir}/cache
|
install -d %{buildroot}%{installdir}/cache
|
||||||
install -d %{buildroot}%{installdir}/cache/lookaside
|
install -d %{buildroot}%{installdir}/cache/lookaside
|
||||||
install -d %{buildroot}%{installdir}/cache/lookaside/pkgs
|
install -d %{buildroot}%{installdir}/cache/lookaside/pkgs
|
||||||
install -d %{buildroot}%{installdir}/web
|
|
||||||
|
|
||||||
cp -a scripts/httpd/upload.cgi %{buildroot}%{installdir}/web/
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# SELinux
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
cd selinux
|
|
||||||
for selinuxvariant in %{selinux_variants}
|
|
||||||
do
|
|
||||||
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
|
||||||
install -p -m 644 %{modulename}.pp.${selinuxvariant} \
|
|
||||||
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
|
|
||||||
done
|
|
||||||
cd -
|
|
||||||
|
|
||||||
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
||||||
|
|
||||||
|
@ -189,16 +152,15 @@ fi
|
||||||
%attr (2775, apache, apache) %{installdir}/cache/lookaside/pkgs
|
%attr (2775, apache, apache) %{installdir}/cache/lookaside/pkgs
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# /usr/share ...... executable files
|
# /usr/share/dist-git ...... executable files
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
%dir %{_datadir}/dist-git
|
%{_datadir}/dist-git
|
||||||
%attr (775, -, -) %{_datadir}/dist-git/*
|
|
||||||
|
|
||||||
|
|
||||||
%files selinux
|
%files selinux
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
%doc selinux/*
|
%doc %{_pkgdocdir}
|
||||||
%{_datadir}/selinux/*/%{modulename}.pp
|
%{_datadir}/selinux/*/%{modulename}.pp
|
||||||
|
|
||||||
|
|
||||||
|
|
163
m4/_ax_text_tpl.m4
Normal file
163
m4/_ax_text_tpl.m4
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
# Text templating system with autoconf
|
||||||
|
# ====================================
|
||||||
|
#
|
||||||
|
# Correctly generate files based on ./configure check results. The @variable@
|
||||||
|
# substitution is usually done by config.status from *.in files, however
|
||||||
|
# substuing paths like @libexecdir@ can result into '${exec_prefix}/libexec'
|
||||||
|
# which is not desired for installed scripts, for example, where we need to have
|
||||||
|
# fully expanded paths. The aim of this script is to generalize steps users
|
||||||
|
# usually do to perform full expansion of configure variables. Currently we use
|
||||||
|
# sed substitution only.
|
||||||
|
#
|
||||||
|
# The easiest usage of this templating system is like this:
|
||||||
|
# $ cat configure.ac | "grep interresting lines"
|
||||||
|
# _AX_TEXT_TPL_INIT
|
||||||
|
# some_other_var="some other var content"
|
||||||
|
# _AX_TEXT_TPL_SUBST([some_other_var])
|
||||||
|
#
|
||||||
|
# $ cat Makefile (or Makefile.am):
|
||||||
|
# generated_file: TEMPLATE.in $(text_tpl_deps)
|
||||||
|
# <<tab>>$(text_tpl_gen)
|
||||||
|
#
|
||||||
|
# Limitations:
|
||||||
|
# - this code is probably not terribly portable
|
||||||
|
# - substitutions should not contain '|' character (because we use sed rules
|
||||||
|
# spelled like 's|||'), you can do things like '\|', however you need to
|
||||||
|
# take into account that substitution done by 'sed' and by 'config.status' are
|
||||||
|
# not the same. Also be careful about escaping '\' caracter.
|
||||||
|
# - only single-line substitutions are expected; you may use '\n' however
|
||||||
|
# there is the same problem as with '|' and '\'.
|
||||||
|
#
|
||||||
|
# TODO:
|
||||||
|
# - we should do something similar to what config.status does (awk generated
|
||||||
|
# source code for substitutions), however even thought usually variable
|
||||||
|
# (macro) values are defined by ./configure, some may be defined like 'make
|
||||||
|
# VARIABLE=VALUE'.
|
||||||
|
|
||||||
|
# sed_subst_var_pattern VARNAME (private macro)
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Generate sed substitution rule to substitute @VARNAME@ with fully expaned
|
||||||
|
# value of $VARNAME. The trick is that we use 'make' to expand the value.
|
||||||
|
# The VARNAME must be AC_SUBST'ed (and all its sub-components like ${prefix},
|
||||||
|
# etc.) to allow 'make' doing correct expansion.
|
||||||
|
m4_define([sed_subst_var_pattern], [\\
|
||||||
|
-e 's|@$1[[@]]|\$($1)|g'])
|
||||||
|
|
||||||
|
# _AX_TEXT_TPL_INIT
|
||||||
|
# -----------------
|
||||||
|
# Initialize the templating system.
|
||||||
|
AC_DEFUN([_AX_TEXT_TPL_INIT], [
|
||||||
|
|
||||||
|
__ax_text_tpl_default_variables="\
|
||||||
|
abs_builddir
|
||||||
|
abs_srcdir
|
||||||
|
abs_top_builddir
|
||||||
|
abs_top_srcdir
|
||||||
|
bindir
|
||||||
|
build_alias
|
||||||
|
builddir
|
||||||
|
datarootdir
|
||||||
|
datadir
|
||||||
|
docdir
|
||||||
|
dvidir
|
||||||
|
exec_prefix
|
||||||
|
host_alias
|
||||||
|
htmldir
|
||||||
|
includedir
|
||||||
|
infodir
|
||||||
|
libdir
|
||||||
|
libexecdir
|
||||||
|
localedir
|
||||||
|
localstatedir
|
||||||
|
mandir
|
||||||
|
oldincludedir
|
||||||
|
pdfdir
|
||||||
|
pkgdatadir
|
||||||
|
prefix
|
||||||
|
psdir
|
||||||
|
sbindir
|
||||||
|
sharedstatedir
|
||||||
|
srcdir
|
||||||
|
sysconfdir
|
||||||
|
target_alias
|
||||||
|
top_srcdir
|
||||||
|
PACKAGE
|
||||||
|
PACKAGE_BUGREPORT
|
||||||
|
PACKAGE_NAME
|
||||||
|
PACKAGE_STRING
|
||||||
|
PACKAGE_TARNAME
|
||||||
|
PACKAGE_URL
|
||||||
|
PACKAGE_VERSION
|
||||||
|
PATH_SEPARATOR
|
||||||
|
SHELL
|
||||||
|
VERSION
|
||||||
|
"
|
||||||
|
|
||||||
|
__ax_text_tpl_sed_rules=""
|
||||||
|
for i in $__ax_text_tpl_default_variables
|
||||||
|
do
|
||||||
|
__ax_text_tpl_sed_rules="$__ax_text_tpl_sed_rules \
|
||||||
|
sed_subst_var_pattern($i)"
|
||||||
|
done
|
||||||
|
|
||||||
|
__ax_text_tpl_sed_rules="$__ax_text_tpl_sed_rules \\
|
||||||
|
\$(__ax_text_tpl_user_sed_rules) \\
|
||||||
|
\$(_AX_TEXT_ADDITIONAL_SED_SUBSTITUTIONS) \\
|
||||||
|
\$\$ax_text_add_sed_substs \\
|
||||||
|
-e 's|@__FILE__[[@]]|\@S|@@|g'"
|
||||||
|
|
||||||
|
__ax_text_tpl_sed_call="\$(SED) \$(__ax_text_tpl_sed_rules)"
|
||||||
|
text_tpl_sed_call=$__ax_text_tpl_sed_call
|
||||||
|
m4_pattern_allow(AM_V_GEN)
|
||||||
|
|
||||||
|
# Convenient snippet to clean & prepare for following build
|
||||||
|
text_tpl_gen_conv_verbose="rm -rf \@S|@@; \$(MKDIR_P) \$(@D)"
|
||||||
|
text_tpl_gen_conv="\$(AM_V_GEN)\$(text_tpl_gen_conv_verbose)"
|
||||||
|
|
||||||
|
# Instantiate arbitrary data text file
|
||||||
|
text_tpl_gen_verbose="\$(text_tpl_gen_conv_verbose) && \$(__ax_text_tpl_sed_call) \$< > \@S|@@ && chmod -w \@S|@@"
|
||||||
|
text_tpl_gen="\$(AM_V_GEN)\$(text_tpl_gen_verbose)"
|
||||||
|
|
||||||
|
# Instantiate script file
|
||||||
|
text_tpl_gen_script_verbose="\$(text_tpl_gen_verbose) && chmod +x \@S|@@"
|
||||||
|
text_tpl_gen_script="\$(AM_V_GEN)\$(text_tpl_gen_script_verbose) && chmod +x \@S|@@"
|
||||||
|
|
||||||
|
# Make dependencies for targets of $(text_tpl_gen) and $(text_tpl_gen_script)
|
||||||
|
text_tpl_deps='$(top_builddir)/config.status Makefile'
|
||||||
|
|
||||||
|
AC_PATH_PROG([SED], [sed])
|
||||||
|
test -z "$ac_cv_path_SED" &&
|
||||||
|
AC_MSG_ERROR([Sed is needed but not found.])
|
||||||
|
|
||||||
|
AC_SUBST([__ax_text_tpl_sed_call])
|
||||||
|
AC_SUBST([__ax_text_tpl_sed_rules])
|
||||||
|
AC_SUBST([__ax_text_tpl_user_sed_rules])
|
||||||
|
AC_SUBST([text_tpl_deps])
|
||||||
|
AC_SUBST([text_tpl_sed_call])
|
||||||
|
AC_SUBST([text_tpl_gen])
|
||||||
|
AC_SUBST([text_tpl_gen_verbose])
|
||||||
|
AC_SUBST([text_tpl_gen_conv])
|
||||||
|
AC_SUBST([text_tpl_gen_conv_verbose])
|
||||||
|
AC_SUBST([text_tpl_gen_script])
|
||||||
|
AC_SUBST([text_tpl_gen_script_verbose])
|
||||||
|
])
|
||||||
|
|
||||||
|
# _AX_TEXT_TPL_SUBST SHELL_VARNAME [VALUE]
|
||||||
|
# ----------------------------------------
|
||||||
|
# Do substitution of SHELL_VARNAME both by config.status, and by sed call
|
||||||
|
# in instantiation rules.
|
||||||
|
AC_DEFUN([_AX_TEXT_TPL_SUBST], [
|
||||||
|
test x = x"$2" || $1=$2
|
||||||
|
__ax_text_tpl_user_sed_rules="$__ax_text_tpl_user_sed_rules\
|
||||||
|
sed_subst_var_pattern($1)"
|
||||||
|
AC_SUBST($1)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# _AX_TEXT_TPL_ARG_VAR VARNAME DEFAULT DESCRIPTION
|
||||||
|
# ------------------------------------------------
|
||||||
|
AC_DEFUN([_AX_TEXT_TPL_ARG_VAR], [
|
||||||
|
AC_ARG_VAR([$1], [$3])
|
||||||
|
test -z "$$1" && $1=$2
|
||||||
|
_AX_TEXT_TPL_SUBST($1)
|
||||||
|
])
|
4
scripts/dist-git/.gitignore
vendored
Normal file
4
scripts/dist-git/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
cgit_pkg_list
|
||||||
|
mkbranch
|
||||||
|
mkbranch_branching
|
||||||
|
setup_git_package
|
26
scripts/dist-git/Makefile.inc
Normal file
26
scripts/dist-git/Makefile.inc
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
pkgdata_SCRIPTS += \
|
||||||
|
%D%/cgit_pkg_list \
|
||||||
|
%D%/mkbranch \
|
||||||
|
%D%/mkbranch_branching \
|
||||||
|
%D%/setup_git_package
|
||||||
|
|
||||||
|
%D%/cgit_pkg_list: %D%/cgit_pkg_list.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
%D%/mkbranch: %D%/mkbranch.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
%D%/mkbranch_branching: %D%/mkbranch_branching.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
%D%/setup_git_package: %D%/setup_git_package.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
CLEANFILES += \
|
||||||
|
$(pkgdata_SCRIPTS)
|
||||||
|
|
||||||
|
EXTRA_DIST += \
|
||||||
|
%D%/cgit_pkg_list.in \
|
||||||
|
%D%/mkbranch.in \
|
||||||
|
%D%/mkbranch_branching.in \
|
||||||
|
%D%/setup_git_package.in
|
|
@ -6,7 +6,7 @@
|
||||||
# Looking for git repos.
|
# Looking for git repos.
|
||||||
#
|
#
|
||||||
|
|
||||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf)"
|
@SHELL_PARSE_CONFIG@
|
||||||
destination=$gitroot_dir/pkgs-git-repos-list
|
destination=$gitroot_dir/pkgs-git-repos-list
|
||||||
|
|
||||||
if [ -n "$1" ]
|
if [ -n "$1" ]
|
2
scripts/dist-git/mkbranch → scripts/dist-git/mkbranch.in
Executable file → Normal file
2
scripts/dist-git/mkbranch → scripts/dist-git/mkbranch.in
Executable file → Normal file
|
@ -11,7 +11,7 @@
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf)"
|
@SHELL_PARSE_CONFIG@
|
||||||
REPODIR=$gitroot_dir/repositories
|
REPODIR=$gitroot_dir/repositories
|
||||||
|
|
||||||
# check if a moron is driving me
|
# check if a moron is driving me
|
2
scripts/dist-git/mkbranch_branching → scripts/dist-git/mkbranch_branching.in
Executable file → Normal file
2
scripts/dist-git/mkbranch_branching → scripts/dist-git/mkbranch_branching.in
Executable file → Normal file
|
@ -11,7 +11,7 @@
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf)"
|
@SHELL_PARSE_CONFIG@
|
||||||
REPODIR=$gitroot_dir/repositories
|
REPODIR=$gitroot_dir/repositories
|
||||||
|
|
||||||
# check if a moron is driving me
|
# check if a moron is driving me
|
2
scripts/dist-git/setup_git_package → scripts/dist-git/setup_git_package.in
Executable file → Normal file
2
scripts/dist-git/setup_git_package → scripts/dist-git/setup_git_package.in
Executable file → Normal file
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf)"
|
@SHELL_PARSE_CONFIG@
|
||||||
REPODIR=$gitroot_dir/repositories
|
REPODIR=$gitroot_dir/repositories
|
||||||
: ${git_author="Undefined <undefined@example.com>"}
|
: ${git_author="Undefined <undefined@example.com>"}
|
||||||
|
|
1
scripts/httpd/.gitignore
vendored
Normal file
1
scripts/httpd/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
upload.cgi
|
8
scripts/httpd/Makefile.inc
Normal file
8
scripts/httpd/Makefile.inc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
web_SCRIPTS = %D%/upload.cgi
|
||||||
|
|
||||||
|
%D%/upload.cgi: %D%/upload.cgi.in $(text_tpl_deps)
|
||||||
|
$(text_tpl_gen_script)
|
||||||
|
|
||||||
|
CLEANFILES += $(web_SCRIPTS)
|
||||||
|
|
||||||
|
EXTRA_DIST += %D%/upload.cgi.in
|
|
@ -93,7 +93,7 @@ def makedirs(dir_, username, mode=02755):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read('/etc/dist-git/dist-git.conf')
|
config.read('@distgit_confdir@/dist-git.conf')
|
||||||
|
|
||||||
os.umask(002)
|
os.umask(002)
|
||||||
|
|
1
selinux/.gitignore
vendored
Normal file
1
selinux/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.pp
|
30
selinux/Makefile.inc
Normal file
30
selinux/Makefile.inc
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
selinux_module = dist_git
|
||||||
|
|
||||||
|
selinux_source_files = \
|
||||||
|
%D%/$(selinux_module).fc \
|
||||||
|
%D%/$(selinux_module).te \
|
||||||
|
%D%/$(selinux_module).if
|
||||||
|
|
||||||
|
EXTRA_DIST += $(selinux_source_files)
|
||||||
|
|
||||||
|
noinst_DATA = $(SELINUX_VARIANTS)
|
||||||
|
|
||||||
|
doc_DATA = \
|
||||||
|
$(selinux_source_files)
|
||||||
|
|
||||||
|
install-data-hook:
|
||||||
|
$(builddir)/install-selinux-module \
|
||||||
|
--destdir $(DESTDIR) \
|
||||||
|
-- $(SELINUX_VARIANTS)
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
$(builddir)/install-selinux-module \
|
||||||
|
--uninstall \
|
||||||
|
--destdir $(DESTDIR) \
|
||||||
|
-- $(SELINUX_VARIANTS)
|
||||||
|
|
||||||
|
# Parallel build causes issues here ATM
|
||||||
|
$(SELINUX_VARIANTS): $(selinux_source_files)
|
||||||
|
$(AM_V_GEN)flock . $(ac_aux_dir)/build-selinux-module $(selinux_module) $@ %D%
|
||||||
|
|
||||||
|
CLEANFILES += $(SELINUX_VARIANTS)
|
Loading…
Add table
Reference in a new issue