How is a source RPM different from unpacking an RPM with rpm2cpio and cpio?

I am attempting to understand the use of a .srpm aka “source rpm” Red Hat Package Manager package. From what I understand so far, a .srpm is different from a standard .rpm in that it provides the source code and is commonly used during development. I am puzzled on why this is useful because if I run rpm2cpio ./myrpm-1.1-1.x86_64.rpm | cpio -idmv, I can still view the source code. As I understand, even standard RPMs pull down a .tar.gz/bz file which contains the source, and eventually builds this. Could you please clarify how source RPMs are different and why I would want to use one?

Go to Source
Author: the_endian

DNS zone on CentOS 7 not working

DNS zone on CentOS 7 not working

I have server with CentOS 7, when i have DNS and domain learn-linux.eu. My domain works but only without www.
my /etc/named.conf file

options {
        listen-on port 53 { 127.0.0.1; 193.33.111.185; };
        #listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        recursing-file  "/var/named/data/named.recursing";
        secroots-file   "/var/named/data/named.secroots";
        allow-query     { localhost; 193.33.111.0/24; };

        /* 
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable 
           recursion. 
         - If your recursive DNS server has a public IP address, you MUST enable access 
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification 
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface 
        */
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.root.key";

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "learn-linux.eu" IN {
        type master;
        file "/var/named/learn-linux.db";
        allow-update {none;};
};

zone "111.33.193.in-addr.arpa" IN {
        type master;
        file "/var/named/193.33.111.db";
        allow-update {none;};

};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

My DNS zone:

$TTL 14400
@ IN  SOA     ns1.learn-linux.eu. root.learn-linux.eu. (
                                                13    ;Serial
                                                1H      ;Refresh
                                                15M     ;Retry
                                                2H      ;Expire
                                                1H      ;Minimum TTL
                                                )

;Name Server Information
@      IN  NS      ns1.learn-linux.eu.
learn-linux.eu. IN A 193.33.111.185
www.learn-linux.eu.     IN A 193.33.111.185
;IP address of Name Server
ns1.learn-linux.eu.     IN      A 193.33.111.185
www     IN  A       193.33.111.185

my reverse zone

@ IN  SOA     ns1.learn-linux.eu. root.learn-linux.eu. (
                                                        6    ;Serial
                                                        1H      ;Refresh
                                                        15M     ;Retry
                                                        4H      ;Expire
                                                        1D      ;Minimum TTL
                                                        )
;Name Server Information
@ IN  NS      ns1.learn-linux.eu.

;Reverse lookup for Name Server
185        IN  PTR     www.learn-linux.eu.

command dig www.learn-linux.eu result

 <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.3 <<>> www.learn-linux.eu
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43694
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.learn-linux.eu.            IN      A

;; ANSWER SECTION:
www.learn-linux.eu.     14400   IN      A       193.33.111.185

;; AUTHORITY SECTION:
learn-linux.eu.         14400   IN      NS      ns1.learn-linux.eu.

;; ADDITIONAL SECTION:
ns1.learn-linux.eu.     14400   IN      A       193.33.111.185

;; Query time: 0 msec
;; SERVER: 193.33.111.185#53(193.33.111.185)
;; WHEN: Mon May 18 15:15:22 CEST 2020
;; MSG SIZE  rcvd: 97

command dig learn-linux.eu result

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.3 <<>> learn-linux.eu
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60013
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;learn-linux.eu.                        IN      A

;; ANSWER SECTION:
learn-linux.eu.         14400   IN      A       193.33.111.185

;; AUTHORITY SECTION:
learn-linux.eu.         14400   IN      NS      ns1.learn-linux.eu.

;; ADDITIONAL SECTION:
ns1.learn-linux.eu.     14400   IN      A       193.33.111.185

;; Query time: 0 msec
;; SERVER: 193.33.111.185#53(193.33.111.185)
;; WHEN: Tue May 19 09:46:35 CEST 2020
;; MSG SIZE  rcvd: 93

named-checkzone

[pawel@learn-linux ~]$ sudo named-checkzone learn-linux.eu /var/named/learn-linux.db
zone learn-linux.eu/IN: loaded serial 13
OK

named status

[pawel@learn-linux pawel]# systemctl status named
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-05-19 09:37:45 CEST; 4s ago
  Process: 1593 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 1608 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
  Process: 1605 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS)
 Main PID: 1610 (named)
   CGroup: /system.slice/named.service
           └─1610 /usr/sbin/named -u named -c /etc/named.conf -4

May 19 09:37:45 learn-linux.eu named[1610]: zone 111.33.193.in-addr.arpa/IN: loaded serial 8
May 19 09:37:45 learn-linux.eu named[1610]: zone localhost/IN: loaded serial 0
May 19 09:37:45 learn-linux.eu named[1610]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
May 19 09:37:45 learn-linux.eu named[1610]: zone learn-linux.eu/IN: loaded serial 14
May 19 09:37:45 learn-linux.eu named[1610]: zone localhost.localdomain/IN: loaded serial 0
May 19 09:37:45 learn-linux.eu named[1610]: all zones loaded
May 19 09:37:45 learn-linux.eu named[1610]: running
May 19 09:37:45 learn-linux.eu systemd[1]: Started Berkeley Internet Name Domain (DNS).
May 19 09:37:45 learn-linux.eu named[1610]: managed-keys-zone: Key 20326 for zone . acceptance timer complete: key now trusted
May 19 09:37:45 learn-linux.eu named[1610]: resolver priming query complete

On firewall i added 53/udp port.
In /etc/resolv.conf i added

nameserver 193.33.111.185

in /etc/sysconfig/network-scripts/ifcfg-eth0 i added

DNS1=193.33.111.185

But my zone still not working with www and without www. In the company where I bought the domain, I set the ns domain to ns1.learn-linux.eu. What i do wrong? I’ve been trying to fix it since yesterday, but to no avail.

Go to Source
Author: PawelC