diff --git a/extras-buildpkgs/90-hostapd-realtek.conf b/extras-buildpkgs/90-hostapd-realtek.conf index bd4a4a8f0..cda67de6d 100644 --- a/extras-buildpkgs/90-hostapd-realtek.conf +++ b/extras-buildpkgs/90-hostapd-realtek.conf @@ -1,7 +1,7 @@ # hostapd-realtek local package_name="hostapd-realtek" local package_repo="http://w1.fi/hostap.git" -local package_ref="branch:hostap_2_5" +local package_ref="tag:hostap_2_5" local package_upstream_version="2.5" local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man" local package_install_target="hostapd-realtek" diff --git a/extras-buildpkgs/90-hostapd.conf b/extras-buildpkgs/90-hostapd.conf index 98e1b2238..455ae4a54 100644 --- a/extras-buildpkgs/90-hostapd.conf +++ b/extras-buildpkgs/90-hostapd.conf @@ -1,7 +1,7 @@ # hostapd local package_name="hostapd" local package_repo="http://w1.fi/hostap.git" -local package_ref="branch:hostap_2_5" +local package_ref="tag:hostap_2_5" local package_upstream_version="2.5" local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man" local package_install_target="hostapd" diff --git a/extras-buildpkgs/hostapd-realtek/debian/config/hostapd.conf b/extras-buildpkgs/hostapd-realtek/debian/config/hostapd.conf new file mode 100644 index 000000000..a3c68e4ef --- /dev/null +++ b/extras-buildpkgs/hostapd-realtek/debian/config/hostapd.conf @@ -0,0 +1,29 @@ +ssid=SSID +interface=wlan0 +hw_mode=g +channel=5 +driver=nl80211 +bridge=br0 +logger_syslog=0 +logger_syslog_level=0 +wmm_enabled=1 +ieee80211n=1 +wpa=2 +preamble=1 +wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=TKIP +rsn_pairwise=CCMP +auth_algs=1 +macaddr_acl=0 +noscan=1 +#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40] +#country_code=SI +#ieee80211d=1 +driver=rtl871xdrv + +#5 Ghz example config +#hw_mode=a +#channel=108 +#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] diff --git a/extras-buildpkgs/hostapd-realtek/debian/control b/extras-buildpkgs/hostapd-realtek/debian/control index f71160211..7b3e25560 100644 --- a/extras-buildpkgs/hostapd-realtek/debian/control +++ b/extras-buildpkgs/hostapd-realtek/debian/control @@ -31,8 +31,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base Breaks: initscripts (<< 2.88dsf-13.3) -Provides: hostapd-realtek -Conflicts: hostapd +Provides: hostapd +Conflicts: hostapd, armbian-hostapd +Replaces: hostapd, armbian-hostapd Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator Originally, hostapd was an optional user space component for Host AP driver. It adds more features to the basic IEEE 802.11 management diff --git a/extras-buildpkgs/hostapd-realtek/debian/hostapd-realtek.default b/extras-buildpkgs/hostapd-realtek/debian/hostapd-realtek.default index 1e12174c2..daeb75eba 100644 --- a/extras-buildpkgs/hostapd-realtek/debian/hostapd-realtek.default +++ b/extras-buildpkgs/hostapd-realtek/debian/hostapd-realtek.default @@ -7,7 +7,7 @@ # file and hostapd will be started during system boot. An example configuration # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # -#DAEMON_CONF="" +#DAEMON_CONF="/etc/hostapd.conf" # Additional daemon options to be appended to hostapd command:- # -d show more debug messages (-dd for even more) diff --git a/extras-buildpkgs/hostapd-realtek/debian/rules b/extras-buildpkgs/hostapd-realtek/debian/rules index a279232e1..3dc50d62c 100644 --- a/extras-buildpkgs/hostapd-realtek/debian/rules +++ b/extras-buildpkgs/hostapd-realtek/debian/rules @@ -47,6 +47,8 @@ override_dh_install: dh_install install --mode=755 -D debian/ifupdown/hostapd.sh \ debian/hostapd-realtek/etc/hostapd/ifupdown.sh + install --mode=644 -D debian/config/hostapd.conf \ + debian/hostapd-realtek/etc/hostapd.conf override_dh_installchangelogs: dh_installchangelogs --package=hostapd-realtek hostapd/ChangeLog @@ -57,6 +59,10 @@ override_dh_gencontrol: override_dh_builddeb: dh_builddeb -- -Zxz -z6 + +override_dh_installinit: + dh_installinit --name=hostapd + ### end dh overrides %: diff --git a/extras-buildpkgs/hostapd/debian/config/hostapd.conf b/extras-buildpkgs/hostapd/debian/config/hostapd.conf new file mode 100644 index 000000000..413f6f21a --- /dev/null +++ b/extras-buildpkgs/hostapd/debian/config/hostapd.conf @@ -0,0 +1,28 @@ +ssid=SSID +interface=wlan0 +hw_mode=g +channel=5 +driver=nl80211 +bridge=br0 +logger_syslog=0 +logger_syslog_level=0 +wmm_enabled=1 +ieee80211n=1 +wpa=2 +preamble=1 +wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=TKIP +rsn_pairwise=CCMP +auth_algs=1 +macaddr_acl=0 +noscan=1 +#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40] +#country_code=SI +#ieee80211d=1 + +#5 Ghz example config +#hw_mode=a +#channel=108 +#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] diff --git a/extras-buildpkgs/hostapd/debian/control b/extras-buildpkgs/hostapd/debian/control index 3ad71e62c..5c69c1179 100644 --- a/extras-buildpkgs/hostapd/debian/control +++ b/extras-buildpkgs/hostapd/debian/control @@ -32,7 +32,8 @@ Depends: ${shlibs:Depends}, lsb-base Breaks: initscripts (<< 2.88dsf-13.3) Provides: hostapd -Conflicts: hostapd-realtek +Conflicts: hostapd, hostapd-realtek, armbian-hostapd +Replaces: hostapd, hostapd-realtek, armbian-hostapd Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator Originally, hostapd was an optional user space component for Host AP driver. It adds more features to the basic IEEE 802.11 management diff --git a/extras-buildpkgs/hostapd/debian/hostapd.default b/extras-buildpkgs/hostapd/debian/hostapd.default index 1e12174c2..daeb75eba 100644 --- a/extras-buildpkgs/hostapd/debian/hostapd.default +++ b/extras-buildpkgs/hostapd/debian/hostapd.default @@ -7,7 +7,7 @@ # file and hostapd will be started during system boot. An example configuration # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # -#DAEMON_CONF="" +#DAEMON_CONF="/etc/hostapd.conf" # Additional daemon options to be appended to hostapd command:- # -d show more debug messages (-dd for even more) diff --git a/extras-buildpkgs/hostapd/debian/rules b/extras-buildpkgs/hostapd/debian/rules index 605768d5f..8775d7d33 100644 --- a/extras-buildpkgs/hostapd/debian/rules +++ b/extras-buildpkgs/hostapd/debian/rules @@ -47,6 +47,8 @@ override_dh_install: dh_install install --mode=755 -D debian/ifupdown/hostapd.sh \ debian/hostapd/etc/hostapd/ifupdown.sh + install --mode=644 -D debian/config/hostapd.conf \ + debian/hostapd-realtek/etc/hostapd.conf override_dh_installchangelogs: dh_installchangelogs --package=hostapd hostapd/ChangeLog diff --git a/general.sh b/general.sh index 301de9f00..cb2114298 100644 --- a/general.sh +++ b/general.sh @@ -257,9 +257,9 @@ addtorepo() # add all deb files to repository # parameter "remove" dumps all and creates new # function: cycle trough distributions - local distributions=("wheezy" "jessie" "trusty" "xenial") + local distributions=("wheezy" "jessie" "trusty" "xenial") for release in "${distributions[@]}"; do - + # let's drop from publish if exits if [[ -n $(aptly publish list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then aptly publish drop -config=config/aptly.conf $release > /dev/null 2>&1 @@ -274,14 +274,14 @@ addtorepo() if [[ $1 == replace ]]; then local replace=true - else - local replace=false + else + local replace=false fi - + # create local repository if not exist if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then display_alert "Creating section" "$release" "info" - aptly repo create -config=config/aptly.conf -distribution=$release -component="main" -comment="Armbian main repository" $release + aptly repo create -config=config/aptly.conf -distribution=$release -component="main" -comment="Armbian main repository" $release fi if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release"-utils") ]]; then aptly repo create -config=config/aptly.conf -distribution=$release -component="utils" -comment="Armbian utilities" "$release"-utils @@ -290,7 +290,7 @@ addtorepo() aptly repo create -config=config/aptly.conf -distribution=$release -component="desktop" -comment="Armbian desktop" "$release"-desktop fi # create local repository if not exist - + # adding main if find $POT -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then display_alert "Adding to repository $release" "main" "ext" @@ -299,32 +299,32 @@ addtorepo() display_alert "Not adding $release" "main" "wrn" fi # adding utils - if find ${POT}extra/$release/utils -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then - display_alert "Adding to repository $release" "utils" "ext" + if find ${POT}extra/$release/utils -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then + display_alert "Adding to repository $release" "utils" "ext" aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-utils ${POT}extra/$release/utils/*.deb else display_alert "Not adding $release" "utils" "wrn" fi - + # adding desktop - if find ${POT}extra/$release/desktop -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then + if find ${POT}extra/$release/desktop -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then display_alert "Adding to repository $release" "desktop" "ext" aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-desktop ${POT}extra/$release/desktop/*.deb else display_alert "Not adding $release" "desktop" "wrn" fi - + # publish aptly publish -passphrase=$GPG_PASS -origin=Armbian -label=Armbian -config=config/aptly.conf -component=main,utils,desktop \ - --distribution=$release repo $release $release"-utils" $release"-desktop" > /dev/null 2>&1 + --distribution=$release repo $release $release"-utils" $release"-desktop" > /dev/null 2>&1 if [ $? -ne 0 ]; then display_alert "Publishing failed" "$release" "err" exit 0 fi done -display_alert "List of local repos" "local" "info" -(aptly repo list -config=config/aptly.conf) | egrep packages + display_alert "List of local repos" "local" "info" + (aptly repo list -config=config/aptly.conf) | egrep packages } # prepare_host