-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdns: Add new package to repo #1457
Open
justledbetter
wants to merge
13
commits into
omniosorg:master
Choose a base branch
from
justledbetter:sdns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
04348b9
Initial commit of SDNS package (needs testing)
justledbetter 1fc3504
Adding missing variables to manifest
justledbetter d4a168a
Fixed package manifest; Added sdns user
justledbetter 1ed09f5
Update copyright date
justledbetter a6786fa
Updated copyright
justledbetter 5cac1c9
Updated uid/gid
justledbetter c05abaf
Merge branch 'omniosorg:master' into sdns
justledbetter a2d5e5a
Add sdns to idlist
justledbetter d01ccae
sdns: version bump
justledbetter 6c70d78
sdns: Moving group to bottom table per @citrus-it
justledbetter 04ad60d
sdns: Fixed build.sh per @citrus-it
justledbetter aee5923
sdns: fixed per @citrus-it
justledbetter 7f5ea84
sdns: Fixed per @citrus-it
justledbetter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/usr/bin/bash | ||
# | ||
# {{{ CDDL HEADER | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# }}} | ||
|
||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
. ../../lib/build.sh | ||
|
||
PROG=sdns | ||
VER=1.3.7 | ||
PKG=ooce/network/sdns | ||
SUMMARY="sdns" | ||
DESC="Simple DNS Server" | ||
|
||
set_arch 64 | ||
set_gover 1.22 | ||
|
||
# No configure | ||
pre_configure() { false; } | ||
|
||
CONFIG=etc/${PREFIX#/}/$PROG | ||
DATA=var/${PREFIX#/}/$PROG | ||
|
||
XFORM_ARGS=" | ||
-DPREFIX=${PREFIX#/} | ||
-DPROG=$PROG | ||
-DVERSION=$VER | ||
-DUSER=sdns -DGROUP=sdns | ||
-DCONFIG=$CONFIG | ||
-DDATA=$DATA | ||
-DXDG_CONFIG=${CONFIG%/$PROG} | ||
-DXDG_DATA=${DATA%/$PROG} | ||
" | ||
|
||
build() { | ||
pushd $TMPDIR/$BUILDDIR > /dev/null | ||
|
||
logmsg "Building $PROG" | ||
export CGO_ENABLED=0 | ||
export GOOS=illumos | ||
|
||
logcmd go build || logerr "Unable to build $PROG" | ||
|
||
popd >/dev/null | ||
} | ||
|
||
init | ||
clone_go_source $PROG semihalev v$VER | ||
patch_source | ||
print_config | ||
prep_build | ||
build | ||
install_go $PROG | ||
xform files/$PROG-template.xml > $TMPDIR/$PROG.xml | ||
install_smf network $PROG.xml | ||
make_package | ||
clean_up | ||
|
||
# Vim hints | ||
# vim:ts=4:sw=4:et:fdm=marker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | ||
<!-- | ||
|
||
This file and its contents are supplied under the terms of the | ||
Common Development and Distribution License ("CDDL"), version 1.0. | ||
You may only use this file in accordance with the terms of version | ||
1.0 of the CDDL. | ||
|
||
A full copy of the text of the CDDL should have accompanied this | ||
source. A copy of the CDDL is also available via the Internet at | ||
http://www.illumos.org/license/CDDL. | ||
|
||
Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
--> | ||
<service_bundle type="manifest" | ||
name="network:sdns"> | ||
|
||
<service name="network/sdns" | ||
type="service" | ||
version="1"> | ||
|
||
<instance name="default" | ||
enabled="false"> | ||
|
||
<dependency name="loopback" | ||
grouping="require_any" | ||
restart_on="error" | ||
type="service"> | ||
<service_fmri value="svc:/network/loopback" /> | ||
</dependency> | ||
|
||
<dependency name="network" | ||
grouping="optional_all" | ||
restart_on="error" | ||
type="service"> | ||
<service_fmri value="svc:/milestone/network" /> | ||
</dependency> | ||
|
||
<dependency name="filesystem_local" | ||
grouping="require_all" | ||
restart_on="none" | ||
type="service"> | ||
<service_fmri value="svc:/system/filesystem/local:default" /> | ||
</dependency> | ||
|
||
<dependent name="sdns_multi-user" | ||
grouping="optional_all" | ||
restart_on="none"> | ||
<service_fmri value="svc:/milestone/multi-user" /> | ||
</dependent> | ||
<method_context security_flags="aslr"> | ||
<method_credential user="$(USER)" | ||
group="$(GROUP)" | ||
limit_privileges="basic,net_privaddr,!proc_info,!file_link_any" /> | ||
<method_environment> | ||
<envvar name="HOME" | ||
value="/$(DATA)" /> | ||
<envvar name="XDG_CONFIG_HOME" | ||
value="/$(XDG_CONFIG)" /> | ||
<envvar name="XDG_DATA_HOME" | ||
value="/$(XDG_DATA)" /> | ||
</method_environment> | ||
</method_context> | ||
|
||
<exec_method type="method" | ||
name="start" | ||
exec="%{config/exec} --config %{config/file} &" | ||
timeout_seconds="60"> | ||
</exec_method> | ||
|
||
<exec_method type="method" | ||
name="stop" | ||
exec=":kill" | ||
timeout_seconds="60"></exec_method> | ||
|
||
<property_group name="config" | ||
type="application"> | ||
<propval name="file" | ||
type="astring" | ||
value="/$(CONFIG)/sdns.conf" /> | ||
<propval name="exec" | ||
type="astring" | ||
value="/$(PREFIX)/bin/$(PROG)" /> | ||
</property_group> | ||
|
||
<template> | ||
<common_name> | ||
<loctext xml:lang="C">sdns $(VERSION)</loctext> | ||
</common_name> | ||
</template> | ||
|
||
</instance> | ||
|
||
<stability value="External" /> | ||
|
||
</service> | ||
|
||
</service_bundle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
|
||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
license LICENSE license=MIT | ||
|
||
dir path=$(CONFIG) owner=$(USER) group=$(GROUP) mode=0700 | ||
dir path=$(DATA) owner=$(USER) group=$(GROUP) mode=0700 | ||
dir path=var/log/$(PREFIX)/$(PROG) owner=$(USER) group=$(GROUP) mode=0755 | ||
|
||
group groupname=$(GROUP) gid=35 | ||
user ftpuser=false username=$(USER) uid=35 group=$(GROUP) \ | ||
gcos-field="SDNS User" home-dir=/$(DATA) password=NP | ||
|
||
<transform file path=$(CONFIG)/ -> set preserve true> | ||
|
||
<transform file path=$(PREFIX)/bin/$(PROG) -> \ | ||
set restart_fmri svc:/network/sdns:default> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ | |
| illumos | 25 | smmsp | ||
| extra | 27 | postfix | ||
| extra | 28 | postdrop | ||
| extra | 35 | sdns | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you misinterpreted the input from @citrus-it. Yes we need this in groups since you allocate the |
||
| extra | 45 | sasl | ||
| illumos | 50 | gdm | ||
| illumos | 52 | upnp | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a leftover from another build.sh