From cbd19301ee92ed4db0c5abae4bb1886ab18d4198 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 14 Sep 2020 20:09:17 +0300 Subject: update --- src/docs/0010.html | 4 +- src/docs/0011.html | 4 +- src/docs/0012.html | 4 +- src/docs/0013.html | 4 +- src/docs/1010.html | 4 +- src/docs/1020.html | 4 +- src/docs/1030.html | 4 +- src/docs/1040.html | 4 +- src/docs/1041.html | 4 +- src/docs/1042.html | 4 +- src/docs/1043.html | 4 +- src/docs/1050.html | 4 +- src/docs/2010.html | 43 +++++ src/docs/2020.html | 43 +++++ src/docs/2030.html | 43 +++++ src/docs/2040.html | 43 +++++ src/docs/2050.html | 43 +++++ src/docs/2210.html | 43 +++++ src/docs/2211.html | 43 +++++ src/docs/2212.html | 43 +++++ src/docs/2220.html | 43 +++++ src/docs/2230.html | 43 +++++ src/docs/2240.html | 43 +++++ src/docs/2241.html | 43 +++++ src/docs/Contribution-Guidelines.html | 6 +- src/docs/Conventions.html | 59 +----- src/docs/General-Conventions.html | 79 ++++++++ src/docs/Init-System.html | 2 +- src/docs/Repository-Conventions.html | 207 +++++++++++++++++++++ src/docs/Sending-Git-mails.html | 95 ++++++++++ ...ng-up-an-rsync-repository-for-distribution.html | 1 + src/docs/Shell-Conventions.html | 96 ++++++++++ 32 files changed, 1033 insertions(+), 76 deletions(-) create mode 100644 src/docs/2010.html create mode 100644 src/docs/2020.html create mode 100644 src/docs/2030.html create mode 100644 src/docs/2040.html create mode 100644 src/docs/2050.html create mode 100644 src/docs/2210.html create mode 100644 src/docs/2211.html create mode 100644 src/docs/2212.html create mode 100644 src/docs/2220.html create mode 100644 src/docs/2230.html create mode 100644 src/docs/2240.html create mode 100644 src/docs/2241.html create mode 100644 src/docs/General-Conventions.html create mode 100644 src/docs/Repository-Conventions.html create mode 100644 src/docs/Sending-Git-mails.html create mode 100644 src/docs/Shell-Conventions.html (limited to 'src/docs') diff --git a/src/docs/0010.html b/src/docs/0010.html index c11c42c..4547016 100644 --- a/src/docs/0010.html +++ b/src/docs/0010.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 0010.

+

The node you are looking for is at 0010.

diff --git a/src/docs/0011.html b/src/docs/0011.html index c8e9a20..5bfb360 100644 --- a/src/docs/0011.html +++ b/src/docs/0011.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 0011.

+

The node you are looking for is at 0011.

diff --git a/src/docs/0012.html b/src/docs/0012.html index 39b6015..faeff7f 100644 --- a/src/docs/0012.html +++ b/src/docs/0012.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 0012.

+

The node you are looking for is at 0012.

diff --git a/src/docs/0013.html b/src/docs/0013.html index 483f1b2..a5b5957 100644 --- a/src/docs/0013.html +++ b/src/docs/0013.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 0013.

+

The node you are looking for is at 0013.

diff --git a/src/docs/1010.html b/src/docs/1010.html index 80fd2d9..0d8c219 100644 --- a/src/docs/1010.html +++ b/src/docs/1010.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1010.

+

The node you are looking for is at 1010.

diff --git a/src/docs/1020.html b/src/docs/1020.html index dc08d81..c003ed0 100644 --- a/src/docs/1020.html +++ b/src/docs/1020.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1020.

+

The node you are looking for is at 1020.

diff --git a/src/docs/1030.html b/src/docs/1030.html index f4fd1ff..8e23c32 100644 --- a/src/docs/1030.html +++ b/src/docs/1030.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1030.

+

The node you are looking for is at 1030.

diff --git a/src/docs/1040.html b/src/docs/1040.html index c42eff1..eb80fab 100644 --- a/src/docs/1040.html +++ b/src/docs/1040.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1040.

+

The node you are looking for is at 1040.

diff --git a/src/docs/1041.html b/src/docs/1041.html index 61beac5..6dab115 100644 --- a/src/docs/1041.html +++ b/src/docs/1041.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1041.

+

The node you are looking for is at 1041.

diff --git a/src/docs/1042.html b/src/docs/1042.html index ac625f2..a6e26a9 100644 --- a/src/docs/1042.html +++ b/src/docs/1042.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1042.

+

The node you are looking for is at 1042.

diff --git a/src/docs/1043.html b/src/docs/1043.html index d293a4e..5105a21 100644 --- a/src/docs/1043.html +++ b/src/docs/1043.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1043.

+

The node you are looking for is at 1043.

diff --git a/src/docs/1050.html b/src/docs/1050.html index 7422d14..4b3a5ec 100644 --- a/src/docs/1050.html +++ b/src/docs/1050.html @@ -33,11 +33,11 @@ ul.no-bullet {list-style: none} --> - + -

The node you are looking for is at 1050.

+

The node you are looking for is at 1050.

diff --git a/src/docs/2010.html b/src/docs/2010.html new file mode 100644 index 0000000..02f5170 --- /dev/null +++ b/src/docs/2010.html @@ -0,0 +1,43 @@ + + + + + + + +2010 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2010.

+ diff --git a/src/docs/2020.html b/src/docs/2020.html new file mode 100644 index 0000000..0162983 --- /dev/null +++ b/src/docs/2020.html @@ -0,0 +1,43 @@ + + + + + + + +2020 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2020.

+ diff --git a/src/docs/2030.html b/src/docs/2030.html new file mode 100644 index 0000000..82e6284 --- /dev/null +++ b/src/docs/2030.html @@ -0,0 +1,43 @@ + + + + + + + +2030 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2030.

+ diff --git a/src/docs/2040.html b/src/docs/2040.html new file mode 100644 index 0000000..51bd56e --- /dev/null +++ b/src/docs/2040.html @@ -0,0 +1,43 @@ + + + + + + + +2040 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2040.

+ diff --git a/src/docs/2050.html b/src/docs/2050.html new file mode 100644 index 0000000..d7628b2 --- /dev/null +++ b/src/docs/2050.html @@ -0,0 +1,43 @@ + + + + + + + +2050 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2050.

+ diff --git a/src/docs/2210.html b/src/docs/2210.html new file mode 100644 index 0000000..29009ab --- /dev/null +++ b/src/docs/2210.html @@ -0,0 +1,43 @@ + + + + + + + +2210 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2210.

+ diff --git a/src/docs/2211.html b/src/docs/2211.html new file mode 100644 index 0000000..a4a85e3 --- /dev/null +++ b/src/docs/2211.html @@ -0,0 +1,43 @@ + + + + + + + +2211 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2211.

+ diff --git a/src/docs/2212.html b/src/docs/2212.html new file mode 100644 index 0000000..171c2c6 --- /dev/null +++ b/src/docs/2212.html @@ -0,0 +1,43 @@ + + + + + + + +2212 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2212.

+ diff --git a/src/docs/2220.html b/src/docs/2220.html new file mode 100644 index 0000000..58fd3f9 --- /dev/null +++ b/src/docs/2220.html @@ -0,0 +1,43 @@ + + + + + + + +2220 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2220.

+ diff --git a/src/docs/2230.html b/src/docs/2230.html new file mode 100644 index 0000000..42c9004 --- /dev/null +++ b/src/docs/2230.html @@ -0,0 +1,43 @@ + + + + + + + +2230 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2230.

+ diff --git a/src/docs/2240.html b/src/docs/2240.html new file mode 100644 index 0000000..4417ca4 --- /dev/null +++ b/src/docs/2240.html @@ -0,0 +1,43 @@ + + + + + + + +2240 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2240.

+ diff --git a/src/docs/2241.html b/src/docs/2241.html new file mode 100644 index 0000000..6cb5a09 --- /dev/null +++ b/src/docs/2241.html @@ -0,0 +1,43 @@ + + + + + + + +2241 (Carbs Linux User Manual) + + + + + + + + + + + + + + +

The node you are looking for is at 2241.

+ diff --git a/src/docs/Contribution-Guidelines.html b/src/docs/Contribution-Guidelines.html index 986da28..f11356d 100644 --- a/src/docs/Contribution-Guidelines.html +++ b/src/docs/Contribution-Guidelines.html @@ -48,12 +48,14 @@ Next: , Previ

3 Contribution Guidelines

Thanks for taking your time to contribute! To maintain stylistic behaviour -throughout the repositories, one must adhere to these guidelines. Exceptions and -changes may occur with good reasoning. +throughout the repositories, one must adhere to these conventions. Exceptions +and changes may occur with good reasoning.

+ diff --git a/src/docs/Conventions.html b/src/docs/Conventions.html index 042f21d..55c3972 100644 --- a/src/docs/Conventions.html +++ b/src/docs/Conventions.html @@ -15,7 +15,7 @@ Licensed under Gnu Free Documentation License. --> - + + + + + + +
+

+Next: , Up: Conventions  

+
+
+

3.1.1 General Conventions – 00

+ +
+
[0010]
+

Try to keep the file readable. +

+
[0011]
+

Characters on a line shouldn’t exceed 100 characters. +

+
[0012]
+

Make sure you don’t have code commented out during commit. Uncomment them +or remove them completely. +

+
[0013]
+

Do not add comments following the code, add them to the top of the code. It +makes it harder to read, and lines longer. Here is an example: +

+
# Good way of commenting.
+your code goes here
+
+your code goes here  # Avoid this way of commenting.
+
+
+
+
+
+ + + + + + diff --git a/src/docs/Init-System.html b/src/docs/Init-System.html index afbd087..285dfab 100644 --- a/src/docs/Init-System.html +++ b/src/docs/Init-System.html @@ -16,7 +16,7 @@ Licensed under Gnu Free Documentation License. --> - + + + + + + +
+

+Previous: , Up: Conventions  

+
+
+

3.1.3 Repository Conventions – 20

+ +

Repository conventions are important in order to ensure every package resemble +themselves. Here are the things to keep in mind: +

+
+
[2010]
+

Prefer tarballs over git packages unless there is a sensible reason. +Here are some: +

+
    +
  • Every patch is a new release. (See vim) +
  • There are no releases. (See https://git.suckless.org/sbase) +
  • Following a development branch. +
  • There has been a long time since the latest release, but upstream is far ahead. +
+ +
+
[2020]
+

Prefer sources without a dependency to automake. There are usually +distribution tarballs that are autoconf’ed. Don’t submit tarballs +with an automake dependency unless you are sure there is no +alternative. +

+
[2030]
+

Avoid these packages: +

+
dbus
+

Usually can be disabled by --disable-dbus +

+
gettext
+

Usually can be disabled by --disable-nls +

+
+
+
[2040]
+
    +
  • Always install a package to the /usr prefix. +
  • All binaries should go to /usr/bin, not /usr/sbin or any other +directory. +
  • All libraries should go to /usr/lib. +
+
+
[2050]
+

All build files on the repository should be a POSIX shell script, and must start +with #!/bin/sh -e. +

+
+ +

The next section is about package templates that should be used in order to +ensure stylistic consistency. Note that the option configurations shouldn’t be +taken literally, they are meant as examples. +

+

[2210] Make +

+
+
#!/bin/sh -e
+
+make
+make DESTDIR="$1" PREFIX=/usr install
+
+ +

[2211] Configure/Make +

+
+
#!/bin/sh -e
+
+./configure \
+    --prefix=/usr \
+    --disable-option \
+    --enable-option
+
+make
+make DESTDIR="$1" install
+
+ + +

[2212] Autoconf/Automake +

+

See 2020 +

+
+
#!/bin/sh -e
+
+autoreconf -fi
+
+./configure \
+    --prefix=/usr \
+    --disable-option \
+    --enable-option
+
+make
+make DESTDIR="$1" install
+
+ +

[2220] Meson +

+
+
#!/bin/sh -e
+
+export DESTDIR=$1
+
+meson \
+    --prefix=/usr \
+    -Doption=false \
+    -Doption2=true \
+    . output
+
+ninja -C output
+ninja -C output install
+
+ +

[2230] Cmake +

+
+
#!/bin/sh -e
+
+export DESTDIR=$1
+
+cmake -B build \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DOPTION=ON
+
+cmake --build   build
+cmake --install build
+
+ +

[2240] Go +

+
+
#!/bin/sh -e
+
+export GOPATH=$PWD/gopath
+trap "go clean -modcache" EXIT INT
+go mod vendor
+
+go build
+install -Dm755 program "$1/usr/bin/program"
+
+ +

[2241] Python +

+
+
#!/bin/sh -e
+
+python setup.py build
+python setup.py install --prefix=/usr --root="$1"
+
+ +
+
+

+Previous: , Up: Conventions  

+
+ + + + + diff --git a/src/docs/Sending-Git-mails.html b/src/docs/Sending-Git-mails.html new file mode 100644 index 0000000..86fa2f7 --- /dev/null +++ b/src/docs/Sending-Git-mails.html @@ -0,0 +1,95 @@ + + + + + + +Sending Git mails (Carbs Linux User Manual) + + + + + + + + + + + + + + + + +
+

+Previous: , Up: Contribution Guidelines  

+
+
+

3.2 Sending Git mails

+ +

As mentioned, the preferred way of contribution is via patches. The easiest way +for sending git mails without git send-email is using msmtp. +You can install it from the repository by doing: +

+
+
$ cpt b msmtp && cpt i msmtp
+
+ +

You can then edit ~/.config/msmtp/config to add your email. Here is an +example configuration, you can use pass, pash, or any other +password manager that fits your needs: +

+
+
defaults
+auth on
+tls on
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+logfile ~/.config/msmtp/msmtp.log
+account my-mail
+host mail.example.com
+port 587
+from me@example.com
+user me@example.com
+passwordeval "pass my-mail"
+
+ +

In order to simply send your patch, do the following: +

+
+
$ git format-patch --to=~carbslinux/dev+subscribe@lists.sr.ht -1 --stdout |
+    msmtp -t -a my-mail
+
+ +

You can also send multiple patches by doing the following: +

+
+
$ git format-patch --to=~carbslinux/dev+subscribe@lists.sr.ht <region>
+
+Edit those files as necessary and send them.
+$ for file in *.patch; do msmtp -t -a my-mail < $patch; done
+
+ + + + + diff --git a/src/docs/Setting-up-an-rsync-repository-for-distribution.html b/src/docs/Setting-up-an-rsync-repository-for-distribution.html index 5c94c69..87dfe78 100644 --- a/src/docs/Setting-up-an-rsync-repository-for-distribution.html +++ b/src/docs/Setting-up-an-rsync-repository-for-distribution.html @@ -96,5 +96,6 @@ exec rsync --daemon --no-detach + diff --git a/src/docs/Shell-Conventions.html b/src/docs/Shell-Conventions.html new file mode 100644 index 0000000..bcaf8b9 --- /dev/null +++ b/src/docs/Shell-Conventions.html @@ -0,0 +1,96 @@ + + + + + + +Shell Conventions (Carbs Linux User Manual) + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: Conventions  

+
+
+

3.1.2 Shell Conventions – 10

+ +

Shell is central to Carbs Linux projects. Most of the tools and packages are +written in POSIX sh. +

+
+
[1010]
+

Use 4 spaces for indentation, don’t use tabs. +

+
[1020]
+

Make sure you don’t use bash-specific code. +

+
[1030]
+

Make sure you lint your code with shellcheck and if you are new to +POSIX sh, use checkbashisms. +

+
[1040]
+

Don’t spawn new processes if you don’t absolutely need to, especially during +string manipulation. +

+
[1041]
+

Never use a program for text manupilation that isn’t defined in the POSIX +standard. This includes gawk and perl. +

+
[1042]
+

Instead of $(basename $file), use ${file##*}. +

+
[1043]
+

Instead of $(dirname $file), use ${file%/*}. +

+
+
+
# This is the same thing as basename /path/to/test.asc .asc
+
+$ file=/path/to/test.asc file=${file##*/} file=${file%.asc}
+$ echo $file
+test
+
+
+
[1050]
+

Instead of backticks, use $(..). +

+
+ + + + + + -- cgit v1.2.3