Compare commits

..

No commits in common. "rawhide" and "f20" have entirely different histories.

6 changed files with 317 additions and 3 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/undertaker-1.2.tar.gz

View file

@ -1,3 +0,0 @@
2016-05-19: Retired orphaned package, because it was orphaned for
more than six weeks.

1
sources Normal file
View file

@ -0,0 +1 @@
455613fb59573a12d5b30abcd87d474b undertaker-1.2.tar.gz

24
undertaker-boost_mt.patch Normal file
View file

@ -0,0 +1,24 @@
diff -up ./undertaker/Makefile~ ./undertaker/Makefile
--- ./undertaker/Makefile~ 2011-08-30 12:11:34.000000000 +0200
+++ ./undertaker/Makefile 2013-07-28 00:56:25.000000000 +0200
@@ -13,7 +13,7 @@ CXXFLAGS = $(CFLAGS)
LDFLAGS =
# LDCOV = -coverage
-LDLIBS = libparser.a ../ziz/libziz.a -lstdc++ -lboost_system -lboost_regex -lboost_filesystem -lpicosat -lboost_wave-mt $(LDCOV)
+LDLIBS = libparser.a ../ziz/libziz.a -lstdc++ -lboost_system -lboost_regex -lboost_filesystem -lpicosat -lboost_wave $(LDCOV)
PARSEROBJ = RsfReader.o KconfigWhitelist.o ConfigurationModel.o \
ModelContainer.o SatChecker.o BlockDefectAnalyzer.o \
diff -up ./ziz/Makefile~ ./ziz/Makefile
--- ./ziz/Makefile~ 2011-08-24 17:05:15.000000000 +0200
+++ ./ziz/Makefile 2013-07-28 00:56:36.000000000 +0200
@@ -3,7 +3,7 @@ LDXX=g++
DEBUG = -g3
CFLAGS = -Wall -Wextra -O2 $(DEBUG)
CXXFLAGS = $(CFLAGS)
-LDLIBS = -lboost_regex -lboost_wave-mt -lboost_system-mt $(LDCOV)
+LDLIBS = -lboost_regex -lboost_wave -lboost_system $(LDCOV)
ZIZOBJ = Ziz.o
HEADERS = $(wildcard *.h)

91
undertaker-picosat.patch Normal file
View file

@ -0,0 +1,91 @@
--- ./undertaker/SatChecker.h.orig 2011-08-24 09:05:15.000000000 -0600
+++ ./undertaker/SatChecker.h 2013-07-31 16:34:25.000000000 -0600
@@ -48,7 +48,7 @@ namespace Picosat {
/* Include the Limmat library header as C */
extern "C" {
-#include <picosat/picosat.h>
+#include <picosat.h>
}
};
@@ -202,6 +202,8 @@ private:
const std::string _sat;
clock_t _runtime;
+ Picosat::PicoSAT *picosat_inst;
+
int stringToSymbol(const std::string &key);
int newSymbol(void);
void addClause(int *clause);
--- ./undertaker/SatChecker.cpp.orig 2011-08-24 09:05:15.000000000 -0600
+++ ./undertaker/SatChecker.cpp 2013-07-31 16:32:06.000000000 -0600
@@ -70,13 +70,13 @@ int SatChecker::stringToSymbol(const std
}
int SatChecker::newSymbol(void) {
- return Picosat::picosat_inc_max_var();
+ return Picosat::picosat_inc_max_var(picosat_inst);
}
void SatChecker::addClause(int *clause) {
for (int *x = clause; *x; x++)
- Picosat::picosat_add(*x);
- Picosat::picosat_add(0);
+ Picosat::picosat_add(picosat_inst, *x);
+ Picosat::picosat_add(picosat_inst, 0);
}
int SatChecker::notClause(int inner_clause) {
@@ -299,7 +299,8 @@ void SatChecker::fillSatChecker(std::str
std::cout << std::string(expression.begin(), expression.begin()
+ info.length) << endl;
*/
- Picosat::picosat_reset();
+ Picosat::picosat_reset(picosat_inst);
+ picosat_inst = NULL;
throw SatCheckerError("SatChecker: Couldn't parse: " + expression);
}
}
@@ -308,7 +309,7 @@ void SatChecker::fillSatChecker(tree_par
iter_t expression = info.trees.begin()->children.begin();
int top_clause = transform_bool_rec(expression);
/* This adds the last clause */
- Picosat::picosat_assume(top_clause);
+ Picosat::picosat_assume(picosat_inst, top_clause);
}
SatChecker::SatChecker(const char *sat, int debug)
@@ -325,26 +326,26 @@ bool SatChecker::operator()() throw (Sat
debug_parser_indent = 0;
try {
- Picosat::picosat_init();
+ picosat_inst = Picosat::picosat_init();
// try to enable as many features as possible
- Picosat::picosat_set_global_default_phase(1);
+ Picosat::picosat_set_global_default_phase(picosat_inst, 1);
fillSatChecker(_sat);
- int res = Picosat::picosat_sat(-1);
+ int res = Picosat::picosat_sat(picosat_inst, -1);
if (res == PICOSAT_SATISFIABLE) {
/* Let's get the assigment out of picosat, because we have to
reset the sat solver afterwards */
std::map<std::string, int>::const_iterator it;
for (it = symbolTable.begin(); it != symbolTable.end(); ++it) {
- bool selected = Picosat::picosat_deref(it->second) == 1;
+ bool selected = Picosat::picosat_deref(picosat_inst, it->second) == 1;
assignmentTable.insert(std::make_pair(it->first, selected));
}
}
- Picosat::picosat_reset();
-
+ Picosat::picosat_reset(picosat_inst);
+ picosat_inst = NULL;
if (res == PICOSAT_UNSATISFIABLE)
return false;

200
undertaker.spec Normal file
View file

@ -0,0 +1,200 @@
Name: undertaker
Version: 1.2
Release: 11%{?dist}
Summary: Find always-on and always-off conditional C code
Group: Development/Languages
License: GPLv2 and GPLv3+
URL: http://vamos.informatik.uni-erlangen.de/trac/undertaker
Source0: http://vamos.informatik.uni-erlangen.de/files/%{name}-%{version}.tar.gz
# As of F20, Boost doesn't ship -mt DSO's anymore.
Patch0: %{name}-boost_mt.patch
# Adapt to new picosat API
Patch1: %{name}-picosat.patch
BuildRequires: boost-devel
BuildRequires: emacs
BuildRequires: ncurses-devel
BuildRequires: picosat-devel
BuildRequires: python2-devel
BuildRequires: xemacs
BuildRequires: xemacs-packages-extra
# Needed for undertaker-calc-coverage
Requires: cpp
Requires: git
Requires: make
Requires: sparse
%description
The undertaker is an implementation of the Vamos project's preprocessor
and configuration analysis approaches. It can check the structure of
preprocessor directives against different configuration models to find
blocks that can't be selected or deselected.
%package emacs
Summary: Emacs support for %{name}
Group: Development/Languages
Requires: emacs(bin) >= %{_emacs_version}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description emacs
Emacs support for %{name}.
%package emacs-el
Summary: Source for Emacs support for %{name}
Group: Development/Languages
Requires: %{name}-emacs = %{version}-%{release}
BuildArch: noarch
%description emacs-el
Source Elisp code for Emacs support for %{name}.
%package xemacs
Summary: XEmacs support for %{name}
Group: Development/Languages
Requires: xemacs(bin) >= %{_xemacs_version}, xemacs-packages-extra
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description xemacs
XEmacs support for %{name}.
%package xemacs-el
Summary: Source for XEmacs support for %{name}
Group: Development/Languages
Requires: %{name}-xemacs = %{version}-%{release}
BuildArch: noarch
%description xemacs-el
Source Elisp code for XEmacs support for %{name}.
%prep
%setup -q -n vamos-%{version}
%patch0
%patch1
# Fix a python path
sed -i "s|^PYTHONPATH=.*|PYTHONPATH=\""%{python2_sitelib}"\"|" \
rsf2model/undertaker-kconfigdump.in
# Fix a python dependency
sed 's|env python|python|' undertaker/undertaker-calc-coverage > foo
chmod a+x foo
touch -r undertaker/undertaker-calc-coverage foo
mv -f foo undertaker/undertaker-calc-coverage
# Use the right flags when building and linking
sed -e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS|" \
-e "s|^LDFLAGS =.*|LDFLAGS = $RPM_OPT_FLAGS|" \
-i undertaker/Makefile
sed -e "s|^LDXX=.*|LDXX=g++ \$(CXXFLAGS)|" \
-e "s|^DEBUG =.*|DEBUG=|" \
-e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS|" \
-i ziz/Makefile
# Fix the Makefile so we don't rebuild everything when installing
sed -e "s|^all:.*|all: \$(PROGS) \$(TEMPLATED) \$(MANPAGES)|" \
-e "s|^install: all.*|install:|" \
-e "s|check undertaker-lcov|check install undertaker-lcov|" \
-i Makefile
# Remove prebuilt objects
make clean
rm -f scripts/basic/docproc scripts/basic/fixdep scripts/basic/hash \
scripts/kconfig/dumpconf undertaker/test-ConditionalBlock \
undertaker/test-SatChecker undertaker/undertaker ziz/zizler
# Fix end-of-line encodings
for f in DeadAnalysis ElDocumentation Interactive ModelFiles Preconditions; do
sed -i.orig 's/\r//' doc/Undertaker$f
touch -r doc/Undertaker$f.orig doc/Undertaker$f
rm -f doc/Undertaker$f.orig
done
%build
# FIXME: building with %%{?_smp_mflags} sometimes fails
make PREFIX=%{_prefix} LIBDIR=%{_libdir} \
HOSTCFLAGS="${RPM_OPT_FLAGS}" HOSTCXXFLAGS="${RPM_OPT_FLAGS}" \
HOSTLDFLAGS="${RPM_LD_FLAGS} -Wl,--as-needed"
%install
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
# The rsf2model script is installed in two places. We only need one.
rm -f $RPM_BUILD_ROOT%{_bindir}/rsf2model
# Copy the Emacs support to the appropriate XEmacs dir and byte compile
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitelispdir}
cp -a $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name} \
$RPM_BUILD_ROOT%{_xemacs_sitelispdir}
cd $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name}
%{_xemacs_bytecompile} *.el
# Byte compile the Emacs support file
cd $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
%{_emacs_bytecompile} *.el
%files
%doc AUTHORS LICENSE README
%doc doc/UndertakerDeadAnalysis doc/UndertakerInteractive
%doc doc/UndertakerModelFiles doc/UndertakerPreconditions
%{_bindir}/*
%{_libdir}/undertaker
%{_mandir}/man1/*
%{python_sitelib}/undertaker*
%files emacs
%doc doc/UndertakerElDocumentation
%dir %{_emacs_sitelispdir}/%{name}
%{_emacs_sitelispdir}/%{name}/*.elc
%files emacs-el
%{_emacs_sitelispdir}/%{name}/*.el
%files xemacs
%doc doc/UndertakerElDocumentation
%dir %{_xemacs_sitelispdir}/%{name}
%{_xemacs_sitelispdir}/%{name}/*.elc
%files xemacs-el
%{_xemacs_sitelispdir}/%{name}/*.el
%changelog
* Wed Jul 31 2013 Jerry James <loganjerry@gmail.com> - 1.2-11
- Add -picosat patch to adapt to new reentrant picosat API
* Sat Jul 27 2013 Petr Machata <pmachata@redhat.com> - 1.2-10
- Rebuild for boost 1.54.0
- Boost.Wave and Boost.System DSO's do not include -mt suffix anymore
(undertaker-boost_mt.patch).
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.2-9
- Rebuild for Boost-1.53.0
* Mon Aug 20 2012 Jerry James <loganjerry@gmail.com> - 1.2-8
- Rebuild for new picosat
* Mon Aug 6 2012 Jerry James <loganjerry@gmail.com> - 1.2-7
- Rebuild for boost 1.50
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
- Rebuilt for c++ ABI breakage
* Tue Jan 10 2012 Jerry James <loganjerry@gmail.com> - 1.2-4
- Rebuild to fix python dependencies
- Drop unnecessary BRs
- Ensure correct LDFLAGS
* Mon Jan 9 2012 Jerry James <loganjerry@gmail.com> - 1.2-3
- Rebuild for GCC 4.7
* Sun Nov 20 2011 Jerry James <loganjerry@gmail.com> - 1.2-2
- Rebuild for new boost
* Tue Sep 20 2011 Jerry James <loganjerry@gmail.com> - 1.2-1
- Initial RPM