Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build-scripts/package-msi
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ pre() {
;;
esac

# Copy default leech2 config (ENT-14100)
install -d "$P"/state/.leech2
install -m 644 "$BASEDIR"/buildscripts/packaging/cfengine-nova/leech2/config.json "$P"/state/.leech2/

# Copy WiX source file for MSI generation
cp "$BASEDIR"/buildscripts/packaging/cfengine-nova/cfengine-nova.wxs "$P"

Expand Down
9 changes: 9 additions & 0 deletions packaging/cfengine-nova-hub/cfengine-nova-hub.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ rm -f $RPM_BUILD_ROOT%{prefix}/bin/cf-upgrade
rm -f $RPM_BUILD_ROOT%{prefix}/lib/php/cfmod.la
rm -f $RPM_BUILD_ROOT%{prefix}/lib/php/cfengine-enterprise-api.la

# Default leech2 config (ENT-14100); shared with the cfengine-nova package
mkdir -p $RPM_BUILD_ROOT%{prefix}/state/.leech2
cp %{_basedir}/buildscripts/packaging/cfengine-nova/leech2/config.json $RPM_BUILD_ROOT%{prefix}/state/.leech2/

# GUI, REST, KB

cp -R %{_basedir}/mission-portal $RPM_BUILD_ROOT%prefix/share/GUI
Expand Down Expand Up @@ -469,5 +473,10 @@ exit 0
%dir %prefix/outputs
%dir %prefix/inputs
%dir %prefix/state
%dir %prefix/state/.leech2

# Mode must match the cfengine-nova package, which also ships this file
%defattr(600,root,root,700)
%prefix/state/.leech2/config.json

%changelog
4 changes: 4 additions & 0 deletions packaging/cfengine-nova-hub/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ install: build
cp -a $(PREFIX)/* $(CURDIR)/debian/tmp$(PREFIX)
cp -a $(BASEDIR)/cfengine/dist/* $(CURDIR)/debian/tmp

# Default leech2 config (ENT-14100); shared with the cfengine-nova package
install -d -m 700 $(CURDIR)/debian/tmp$(PREFIX)/state/.leech2
install -m 644 $(BASEDIR)/buildscripts/packaging/cfengine-nova/leech2/config.json $(CURDIR)/debian/tmp$(PREFIX)/state/.leech2/

# Remove unnecessary files

rm -f $(CURDIR)/debian/tmp$(PREFIX)/lib/libpromises.la
Expand Down
8 changes: 8 additions & 0 deletions packaging/cfengine-nova/cfengine-nova.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ License: COSL
Group: Applications/System
Url: https://cfengine.com
BuildRoot: %{_topdir}/%{name}-%{version}-%{release}-buildroot
Source0: leech2/config.json
Obsoletes: cfengine3 < @@VERSION@@, cf-community < @@VERSION@@
Requires: coreutils
# "Recommends" is only supported on RHEL 8+
Expand Down Expand Up @@ -73,6 +74,10 @@ rm -rf $RPM_BUILD_ROOT/usr/lib/systemd/system/cf-hub.service
rm -rf $RPM_BUILD_ROOT/usr/lib/systemd/system/cf-reactor.service
rm -rf $RPM_BUILD_ROOT/usr/lib/systemd/system/cf-postgres.service

# Default leech2 config (ENT-14100)
mkdir -p $RPM_BUILD_ROOT%{prefix}/state/.leech2
cp %{SOURCE0} $RPM_BUILD_ROOT%{prefix}/state/.leech2/

# Create symlinks to /usr/local/sbin and /usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/local/sbin
mkdir -p $RPM_BUILD_ROOT/usr/sbin
Expand Down Expand Up @@ -216,6 +221,9 @@ exit 0
%dir %prefix/outputs
%dir %prefix/inputs
%dir %prefix/modules
%dir %prefix/state
%dir %prefix/state/.leech2
%prefix/state/.leech2/config.json


%changelog
10 changes: 10 additions & 0 deletions packaging/cfengine-nova/cfengine-nova.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@
<Component Id='openssl.cnf' Guid='51EF6C21-D0AD-4A29-9F83-B72B5DF614A5' Win64='$(var.isWin64)'>
<File Id='openssl.cnf' Name='openssl.cnf' KeyPath='yes' DiskId='1' Source='$(var.CfSourceDir)\ssl\openssl.cnf' />
</Component>
</Directory>
<!-- ===== Cfengine\state\.leech2 ===== -->
<Directory Id='dir_state' Name='state'>
<Directory Id='dir_state_leech2' Name='.leech2'>
<Component Id='leech2_config.json' Guid='1781E340-7772-4715-833D-DFAAE22A83EF' Win64='$(var.isWin64)'>
<File Id='leech2_config.json' Name='config.json' KeyPath='yes' DiskId='1' Source='$(var.CfSourceDir)\state\.leech2\config.json' />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
Expand Down Expand Up @@ -222,6 +230,8 @@
<ComponentRef Id='libcurl_4.dll' />

<ComponentRef Id='openssl.cnf' />

<ComponentRef Id='leech2_config.json' />
</Feature>

<UI>
Expand Down
1 change: 1 addition & 0 deletions packaging/cfengine-nova/debian/cfengine-nova.install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/var/cfengine/lib/liblmdb.so
/var/cfengine/lib/libleech2.so
/var/cfengine/bin/lch
/var/cfengine/state/.leech2/config.json
/var/cfengine/share/doc
/var/cfengine/modules
/var/cfengine/inputs
Expand Down
4 changes: 4 additions & 0 deletions packaging/cfengine-nova/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ install: build
cp -a $(PREFIX)/* $(CURDIR)/debian/tmp$(PREFIX)
cp -a $(BASEDIR)/cfengine/dist/* $(CURDIR)/debian/tmp

# Default leech2 config (ENT-14100)
install -d -m 700 $(CURDIR)/debian/tmp$(PREFIX)/state/.leech2
install -m 644 $(CURDIR)/leech2/config.json $(CURDIR)/debian/tmp$(PREFIX)/state/.leech2/

# Remove unnecessary files

rm -f $(CURDIR)/debian/tmp$(PREFIX)/lib/libpromises.la
Expand Down
43 changes: 43 additions & 0 deletions packaging/cfengine-nova/leech2/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"truncate": {
"max-blocks": 100,
"truncate-reported": false,
"remove-orphans": true
},
"tables": {
"__containers": {
"fields": [
{ "name": "owner", "type": "TEXT", "primary-key": true },
{ "name": "id", "type": "TEXT", "primary-key": true },
{ "name": "name", "type": "TEXT" },
{ "name": "image", "type": "TEXT" },
{ "name": "image_id", "type": "TEXT" },
{ "name": "command", "type": "TEXT" },
{ "name": "state", "type": "TEXT" },
{ "name": "ports", "type": "TEXT" },
{ "name": "engine", "type": "TEXT" },
{ "name": "started_at", "type": "TEXT" },
{ "name": "details", "type": "TEXT" }
]
},
"__container_images": {
"fields": [
{ "name": "owner", "type": "TEXT", "primary-key": true },
{ "name": "id", "type": "TEXT", "primary-key": true },
{ "name": "repository", "type": "TEXT" },
{ "name": "tag", "type": "TEXT" },
{ "name": "size_bytes", "type": "NUMBER" },
{ "name": "created_at", "type": "TEXT" }
]
},
"__container_volumes": {
"fields": [
{ "name": "owner", "type": "TEXT", "primary-key": true },
{ "name": "name", "type": "TEXT", "primary-key": true },
{ "name": "driver", "type": "TEXT" },
{ "name": "size_bytes", "type": "NUMBER" },
{ "name": "created_at", "type": "TEXT" }
]
}
}
}
Loading